Skip to content

Commit

Permalink
update dependency map & simple lemmas
Browse files Browse the repository at this point in the history
  • Loading branch information
forked-from-1kasper committed Dec 23, 2023
1 parent c46908b commit 2bdc27a
Show file tree
Hide file tree
Showing 3 changed files with 644 additions and 627 deletions.
9 changes: 9 additions & 0 deletions GroundZero/Structures.lean
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ namespace hlevel
| n, −2 => (predPredSuccSucc n)⁻¹
| n, succ m => ap succ (addNatToAdd n m)

hott lemma addNatSuccSucc : Π n m, addNat (succ (succ n)) m = succ (succ (addNat n m))
| n, Nat.zero => idp (succ (succ n))
| n, Nat.succ m => ap succ (addNatSuccSucc n m)

hott lemma addSuccSucc : Π n m, add (succ (succ n)) m = addNat n (succSucc m)
| n, −2 => idp n
| n, −1 => idp (succ n)
| n, succ (succ m) => addNatSuccSucc n (succSucc m)

instance : HAdd ℕ₋₂ ℕ₋₂ ℕ₋₂ := ⟨add⟩

hott definition ofNat (n : ℕ) : ℕ₋₂ :=
Expand Down
14 changes: 14 additions & 0 deletions GroundZero/Theorems/Nat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,18 @@ namespace UnitList
end UnitList

end Theorems

namespace Structures
open GroundZero.Theorems

namespace hlevel
hott corollary comm : Π n m, add n m = add m n
| n, −2 => (minusTwoAdd n)⁻¹
| n, −1 => (minusOneAdd n)⁻¹
| n, succ (succ m) => addNatToAdd _ _ ⬝ ap predPred (Nat.comm _ _) ⬝
(addNatToAdd _ _)⁻¹ ⬝ (addSuccSucc m n)⁻¹
end hlevel

end Structures

end GroundZero
Loading

0 comments on commit 2bdc27a

Please sign in to comment.