We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c33e118 commit fae2be0Copy full SHA for fae2be0
1 file changed
Cslib/Languages/LambdaCalculus/Unscoped/Untyped/DeBruijnSyntax.lean
@@ -69,7 +69,11 @@ infixl:77 "·" => Term.app
69
| abs t => abs (subst (j + 1) (incre 1 0 s) t)
70
| app t u => app (subst j s t) (subst j s u)
71
72
-/-- `decre c t` decrements free vars `> c` by `i`. -/
+/-- `decre i l t` decrements `i` for all free vars `≥ l + i`.
73
+ the reason using `l + i` is that it is more explicit for
74
+ free variable elimination. For example, after eliminating
75
+ `var k` for Term `t` from the most outside, `decre 1 k t`
76
+ will close the gap caused by `k` elimination. -/
77
@[expose] public def decre (i : Nat) (l : Nat) : Term → Term
78
| var k => if l + i ≤ k then var (k - i) else var k
79
| abs t => abs (decre i (l + 1) t)
0 commit comments