fix: fix typos in deBruijn.lean and phoas.lean examples
This commit is contained in:
parent
0bdab9b4f7
commit
7326c817d2
2 changed files with 2 additions and 2 deletions
|
|
@ -153,7 +153,7 @@ use hypotheses such as `a = b` as rewriting/simplications rules.
|
|||
We use the `split` to break the nested `match` expression in the `plus` case into two cases.
|
||||
The local variables `iha` and `ihb` are the induction hypotheses for `a` and `b`.
|
||||
The modifier `←` in a term simplifier argument instructs the term simplier to use the equation as a rewriting rule in
|
||||
the "reverse direction. That is, given `h : a = b`, `← h` instructs the term simplifier to rewrite `b` subterms to `a`.
|
||||
the "reverse direction". That is, given `h : a = b`, `← h` instructs the term simplifier to rewrite `b` subterms to `a`.
|
||||
-/
|
||||
theorem Term.constFold_sound (e : Term ctx ty) : e.constFold.denote env = e.denote env := by
|
||||
induction e with simp [*]
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ We can write a function to translate `Ty` values to a Lean type
|
|||
— remember that types are first class, so can be calculated just like any other value.
|
||||
We mark `Ty.denote` as `[reducible]` to make sure the typeclass resolution procedure can
|
||||
unfold/reduce it. For example, suppose Lean is trying to synthesize a value for the instance
|
||||
`Add (Ty.denote Ty.nat)`. Since `Ty.denote` is marked as `[reducible],
|
||||
`Add (Ty.denote Ty.nat)`. Since `Ty.denote` is marked as `[reducible]`,
|
||||
the typeclass resolution procedure can reduce `Ty.denote Ty.nat` to `Nat`, and use
|
||||
the builtin instance for `Add Nat` as the solution.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue