Skip to content

Commit 0002f11

Browse files
trfl function
1 parent 612d709 commit 0002f11

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Katydid/Conal/Examples.lean

+14-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,20 @@ example : (char 'a' ⋃ char 'b') (String.toList "b") := by
2727

2828
-- _ : a⋆b ('a' ∷ 'b' ∷ [])
2929
-- _ = ([ 'a' ] , [ 'b' ]) , refl , refl , refl
30-
example : (char 'a', char 'b') (String.toList "ab") := by sorry
31-
-- TODO: ⟨ ['a'], ['b'], TEq.mk rfl, TEq.mk rfl, rfl ⟩
30+
example : (char 'a', char 'b') (String.toList "ab") := by
31+
simp
32+
exists ['a']
33+
exists ['b']
34+
exists trfl
35+
exists trfl
36+
37+
example : (char 'a', char 'b') (String.toList "ab") := by
38+
simp
39+
refine PSigma.mk ['a'] ?a
40+
refine PSigma.mk ['b'] ?b
41+
refine PSigma.mk trfl ?c
42+
refine PSigma.mk trfl ?d
43+
rfl
3244

3345
example : ((char 'a')*) (String.toList "a") := by sorry
3446
-- TODO:

Katydid/Std/Tipe2.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ example : TEq 1 1 := by
1212
constructor
1313
rfl
1414

15-
-- @[match_pattern] def trfl {α : Type u} {a : α} : TEq a a := @TEq.refl α a
16-
-- attribute [simp] trfl
15+
@[match_pattern] def trfl {α : Type u} {a : α} : TEq a a := TEq.mk rfl
16+
attribute [simp] trfl
1717

1818
-- the abbreviation ≡ is typed with `slash = =`
1919
infixl:65 " ≡ " => TEq

0 commit comments

Comments
 (0)