Skip to content

Commit

Permalink
Add a simple example
Browse files Browse the repository at this point in the history
  • Loading branch information
eyihluyc committed Dec 6, 2024
1 parent fa4f453 commit f9a232f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Minimal/Examples.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import Minimal.Calculus

open Term
open OptionalAttr
open Reduce

-- ⟦ a ↦ ⟦ ⟧ ⟧.a
def example1 : Term :=
dot
(obj
(Bindings.cons
"a"
(by simp)
(attached (obj (Bindings.nil)))
Bindings.nil))
"a"

-- ⟦ ⟧
def example1' : Term := obj Bindings.nil

-- ⟦ a ↦ ⟦ ⟧ ⟧.a ⇝ ⟦ ⟧
def test1_red1 : example1 ⇝ example1' := by
rw [example1, example1']
exact (dot_c
(obj Bindings.nil)
"a"
(Bindings.cons
"a"
(by simp)
(attached (obj (Bindings.nil)))
Bindings.nil)
(by simp)
(by simp [lookup]))

-- ⟦ a ↦ ⟦ ⟧ ⟧.a ⇝* ⟦ ⟧
def test1 : example1 ⇝* example1' := ReflTransGen.head
test1_red1
ReflTransGen.refl

0 comments on commit f9a232f

Please sign in to comment.