Skip to content

Commit

Permalink
5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
forked-from-1kasper committed Apr 17, 2024
1 parent d8c41ea commit 86adb04
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions GroundZero/Exercises/Chap5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,34 @@ open GroundZero

universe u v w

-- Exercise 5.1

namespace «5.1»
/-
Another useful example is the type List(A) of finite lists of elements of some type A,
which has constructors
• nil : List(A)
• cons : A → List(A) → List(A).
-/

variable (List : TypeType)

variable (A : Type) (nil : List A) (cons : A → List A → List A)

hott definition indSig :=
Π (C : List A → Type), C nil → (Π (x : A) (xs : List A), C xs → C (cons x xs)) → Π ys, C ys

variable (ind : indSig List A nil cons)

variable (C : List A → Type) (cz : C nil) (cs : Π (x : A) (xs : List A), C xs → C (cons x xs))

hott definition indβruleSig₁ :=
ind C cz cs nil = cz

hott definition indβruleSig₂ :=
Π (x : A) (xs : List A), ind C cz cs (cons x xs) = cs x xs (ind C cz cs xs)
end «5.1»

-- Exercise 5.2

namespace «5.2»
Expand Down

0 comments on commit 86adb04

Please sign in to comment.