This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Lean | |
| open Lean Meta PrettyPrinter | |
| open Lean.Elab Command | |
| /-! | |
| # Mutual induction in Lean, with a tiny standalone example | |
| This file is designed to be copied into a small Lean 4 project and explored | |
| interactively. It contains: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| subst-3m : ∀ k₁ k₂ k₃ es {Γ A B e e₁ j} | |
| → len es < k₁ | |
| → size j < k₂ | |
| → size-t B < k₃ | |
| → Γ , A ⊢d j # e ▻ (es ⇈) ⦂ B | |
| → Γ ⊢d ♭ Z # e₁ ⦂ A | |
| → Γ ⊢d j # ((ƛ e) · e₁) ▻ es ⦂ B | |
| subst-3m (suc k₁) (suc k₂) (suc k₃) [] sz₁ sz₂ sz₃ ⊢1 ⊢2 = ⊢d-app⇒ (⊢d-lam₂ ⊢1) ⊢2 | |
| subst-3m (suc k₁) (suc k₂) (suc k₃) (e ∷ es) {j = j} sz₁ sz₂ sz₃ ⊢1 ⊢2 = | |
| case lst-destruct-rev (e ∷ es) (ees>0 {e} {es}) of λ where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .tocset { | |
| position: fixed !important; | |
| overflow-y: scroll; | |
| max-height: 100%; | |
| } |