Skip to content

Commit fae2be0

Browse files
committed
upd: clarification for consistency of decre
1 parent c33e118 commit fae2be0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Cslib/Languages/LambdaCalculus/Unscoped/Untyped/DeBruijnSyntax.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ infixl:77 "·" => Term.app
6969
| abs t => abs (subst (j + 1) (incre 1 0 s) t)
7070
| app t u => app (subst j s t) (subst j s u)
7171

72-
/-- `decre c t` decrements free vars `> c` by `i`. -/
72+
/-- `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. -/
7377
@[expose] public def decre (i : Nat) (l : Nat) : Term → Term
7478
| var k => if l + i ≤ k then var (k - i) else var k
7579
| abs t => abs (decre i (l + 1) t)

0 commit comments

Comments
 (0)