Skip to content

Commit 1f7745d

Browse files
Update Lean version
1 parent ad2be0f commit 1f7745d

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

Katydid/Conal/Language.lean

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ namespace Lang
1919
-- variable α should be implicit to make sure examples do not need to also provide the parameter of α when constructing char, or, concat, since it usually can be inferred to be Char.
2020
variable {α : Type u}
2121

22+
-- TODO: Why are these definitions open, instead of in an inductive family, like
23+
-- https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Proof.20relevance/near/419702213
24+
-- One reason is that with not operator, which run into the strictly positive limitation, but we don't have the not operator in the Agda paper.
25+
-- TODO: Ask Conal if there is another reason.
26+
2227
-- ∅ : Lang
2328
-- ∅ w = ⊥
2429
def emptySet : Lang α :=
@@ -79,7 +84,10 @@ def star (P : Lang α) : Lang α :=
7984
fun (w : List α) =>
8085
Σ' (ws : List (List α)), (_pws: All P ws) ×' w = (List.join ws)
8186

82-
#print star
87+
-- TODO: What does proof relevance even mean for the `not` operator?
88+
def not (P: Lang α) : Lang α :=
89+
fun (w: List α) =>
90+
P w -> Empty
8391

8492
-- attribute [simp] allows these definitions to be unfolded when using the simp tactic.
8593
attribute [simp] universal emptySet emptyStr char scalar or and concat star

Katydid/Std/Tipe.lean

+1-16
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def eq_of_teq {α : Type u} {a a' : α} (h : TEq a a') : Eq a a' :=
4747
h₁.rec (fun _ => rfl)
4848
this α α a a' h rfl
4949

50-
-- TODO: Find out if this is legal
50+
-- This is legal because TEq is a sub singleton, it has one of fewer ways to be constructed.
5151
def teq_of_eq {α : Type u} {a a' : α} (h : Eq a a') : TEq a a' :=
5252
have : (α β : Type u) → (a b: α) → Eq a b → (h : TEq α β) → TEq a b :=
5353
fun _ _ _ _ h₁ =>
@@ -121,21 +121,6 @@ structure TIff (a b : Type) : Type where
121121
/-- Modus ponens for if and only if, reversed. If `a ↔ b` and `b`, then `a`. -/
122122
mpr : b → a
123123

124-
infix:19 " <-> " => TIff
125-
126-
structure Tiso (a b : Type) : Type where
127-
intro ::
128-
f : a → b
129-
f' : b → a
130-
ff' : ∀ x, f (f' x) ≡ x
131-
f'f : ∀ x, f' (f x) ≡ x
132-
133-
infix:19 " ↔ " => Tiso -- slash <->
134-
135-
def Teso {w : α} (P : α -> Type) (Q : α -> Type) := Tiso (P w) (Q w)
136-
137-
infix:19 " ⟷ " => Teso -- slash <-->
138-
139124
theorem t : 12 -> False := by
140125
intro x
141126
contradiction

lean-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
leanprover/lean4:v4.5.0-rc1
1+
leanprover/lean4:v4.5.0

0 commit comments

Comments
 (0)