Skip to content

Commit

Permalink
trfl function
Browse files Browse the repository at this point in the history
  • Loading branch information
awalterschulze committed Feb 25, 2024
1 parent 612d709 commit 0002f11
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions Katydid/Conal/Examples.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,20 @@ example : (char 'a' ⋃ char 'b') (String.toList "b") := by

-- _ : a⋆b ('a' ∷ 'b' ∷ [])
-- _ = ([ 'a' ] , [ 'b' ]) , refl , refl , refl
example : (char 'a', char 'b') (String.toList "ab") := by sorry
-- TODO: ⟨ ['a'], ['b'], TEq.mk rfl, TEq.mk rfl, rfl ⟩
example : (char 'a', char 'b') (String.toList "ab") := by
simp
exists ['a']
exists ['b']
exists trfl
exists trfl

example : (char 'a', char 'b') (String.toList "ab") := by
simp
refine PSigma.mk ['a'] ?a
refine PSigma.mk ['b'] ?b
refine PSigma.mk trfl ?c
refine PSigma.mk trfl ?d
rfl

example : ((char 'a')*) (String.toList "a") := by sorry
-- TODO:
Expand Down
4 changes: 2 additions & 2 deletions Katydid/Std/Tipe2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ example : TEq 1 1 := by
constructor
rfl

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

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

0 comments on commit 0002f11

Please sign in to comment.