url stringclasses 147
values | commit stringclasses 147
values | file_path stringlengths 7 101 | full_name stringlengths 1 94 | start stringlengths 6 10 | end stringlengths 6 11 | tactic stringlengths 1 11.2k | state_before stringlengths 3 2.09M | state_after stringlengths 6 2.09M |
|---|---|---|---|---|---|---|---|---|
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_if_Iff | [316, 9] | [341, 25] | cases h with
| intro hB hS =>
apply BigStep.if_true <;>
assumption | case mpr.inl
B : State → Prop
S T : Stmt
s t : State
h : B s ∧ (S, s) ⟹ t
⊢ (Stmt.ifThenElse B S T, s) ⟹ t | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_if_Iff | [316, 9] | [341, 25] | apply BigStep.if_true <;>
assumption | case mpr.inl.intro
B : State → Prop
S T : Stmt
s t : State
hB : B s
hS : (S, s) ⟹ t
⊢ (Stmt.ifThenElse B S T, s) ⟹ t | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_if_Iff | [316, 9] | [341, 25] | cases h with
| intro hB hT =>
apply BigStep.if_false <;>
assumption | case mpr.inr
B : State → Prop
S T : Stmt
s t : State
h : ¬B s ∧ (T, s) ⟹ t
⊢ (Stmt.ifThenElse B S T, s) ⟹ t | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_if_Iff | [316, 9] | [341, 25] | apply BigStep.if_false <;>
assumption | case mpr.inr.intro
B : State → Prop
S T : Stmt
s t : State
hB : ¬B s
hT : (T, s) ⟹ t
⊢ (Stmt.ifThenElse B S T, s) ⟹ t | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | apply Iff.intro | B : State → Prop
S : Stmt
s u : State
⊢ (Stmt.whileDo B S, s) ⟹ u ↔ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s | case mp
B : State → Prop
S : Stmt
s u : State
⊢ (Stmt.whileDo B S, s) ⟹ u → (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s
case mpr
B : State → Prop
S : Stmt
s u : State
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s → (Stmt.whileDo B S, s) ⟹ u |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | { intro h
cases h with
| while_true _ _ _ t _ hB hS hw =>
apply Or.intro_left
apply Exists.intro t
aesop
| while_false _ _ _ hB =>
apply Or.intro_right
aesop } | case mp
B : State → Prop
S : Stmt
s u : State
⊢ (Stmt.whileDo B S, s) ⟹ u → (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s
case mpr
B : State → Prop
S : Stmt
s u : State
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s → (Stmt.whileDo B S, s) ⟹ u | case mpr
B : State → Prop
S : Stmt
s u : State
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s → (Stmt.whileDo B S, s) ⟹ u |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | { intro h
cases h with
| inl hex =>
cases hex with
| intro t h =>
cases h with
| intro hB h =>
cases h with
| intro hS hwhile =>
apply BigStep.while_true <;>
assumption
| inr h =>
cases h with
| intro hB hus =>
rw [hus]
apply BigStep.while_false
assumption} | case mpr
B : State → Prop
S : Stmt
s u : State
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s → (Stmt.whileDo B S, s) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | intro h | case mp
B : State → Prop
S : Stmt
s u : State
⊢ (Stmt.whileDo B S, s) ⟹ u → (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s | case mp
B : State → Prop
S : Stmt
s u : State
h : (Stmt.whileDo B S, s) ⟹ u
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | cases h with
| while_true _ _ _ t _ hB hS hw =>
apply Or.intro_left
apply Exists.intro t
aesop
| while_false _ _ _ hB =>
apply Or.intro_right
aesop | case mp
B : State → Prop
S : Stmt
s u : State
h : (Stmt.whileDo B S, s) ⟹ u
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | apply Or.intro_left | case mp.while_true
B : State → Prop
S : Stmt
s u t : State
hB : B s
hS : (S, s) ⟹ t
hw : (Stmt.whileDo B S, t) ⟹ u
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s | case mp.while_true.h
B : State → Prop
S : Stmt
s u t : State
hB : B s
hS : (S, s) ⟹ t
hw : (Stmt.whileDo B S, t) ⟹ u
⊢ ∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | apply Exists.intro t | case mp.while_true.h
B : State → Prop
S : Stmt
s u t : State
hB : B s
hS : (S, s) ⟹ t
hw : (Stmt.whileDo B S, t) ⟹ u
⊢ ∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u | case mp.while_true.h
B : State → Prop
S : Stmt
s u t : State
hB : B s
hS : (S, s) ⟹ t
hw : (Stmt.whileDo B S, t) ⟹ u
⊢ B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | aesop | case mp.while_true.h
B : State → Prop
S : Stmt
s u t : State
hB : B s
hS : (S, s) ⟹ t
hw : (Stmt.whileDo B S, t) ⟹ u
⊢ B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | apply Or.intro_right | case mp.while_false
B : State → Prop
S : Stmt
s : State
hB : ¬B s
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ s) ∨ ¬B s ∧ s = s | case mp.while_false.h
B : State → Prop
S : Stmt
s : State
hB : ¬B s
⊢ ¬B s ∧ s = s |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | aesop | case mp.while_false.h
B : State → Prop
S : Stmt
s : State
hB : ¬B s
⊢ ¬B s ∧ s = s | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | intro h | case mpr
B : State → Prop
S : Stmt
s u : State
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s → (Stmt.whileDo B S, s) ⟹ u | case mpr
B : State → Prop
S : Stmt
s u : State
h : (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s
⊢ (Stmt.whileDo B S, s) ⟹ u |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | cases h with
| inl hex =>
cases hex with
| intro t h =>
cases h with
| intro hB h =>
cases h with
| intro hS hwhile =>
apply BigStep.while_true <;>
assumption
| inr h =>
cases h with
| intro hB hus =>
rw [hus]
apply BigStep.while_false
assumption | case mpr
B : State → Prop
S : Stmt
s u : State
h : (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s
⊢ (Stmt.whileDo B S, s) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | cases hex with
| intro t h =>
cases h with
| intro hB h =>
cases h with
| intro hS hwhile =>
apply BigStep.while_true <;>
assumption | case mpr.inl
B : State → Prop
S : Stmt
s u : State
hex : ∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u
⊢ (Stmt.whileDo B S, s) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | cases h with
| intro hB h =>
cases h with
| intro hS hwhile =>
apply BigStep.while_true <;>
assumption | case mpr.inl.intro
B : State → Prop
S : Stmt
s u t : State
h : B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u
⊢ (Stmt.whileDo B S, s) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | cases h with
| intro hS hwhile =>
apply BigStep.while_true <;>
assumption | case mpr.inl.intro.intro
B : State → Prop
S : Stmt
s u t : State
hB : B s
h : (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u
⊢ (Stmt.whileDo B S, s) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | apply BigStep.while_true <;>
assumption | case mpr.inl.intro.intro.intro
B : State → Prop
S : Stmt
s u t : State
hB : B s
hS : (S, s) ⟹ t
hwhile : (Stmt.whileDo B S, t) ⟹ u
⊢ (Stmt.whileDo B S, s) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | cases h with
| intro hB hus =>
rw [hus]
apply BigStep.while_false
assumption | case mpr.inr
B : State → Prop
S : Stmt
s u : State
h : ¬B s ∧ u = s
⊢ (Stmt.whileDo B S, s) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | rw [hus] | case mpr.inr.intro
B : State → Prop
S : Stmt
s u : State
hB : ¬B s
hus : u = s
⊢ (Stmt.whileDo B S, s) ⟹ u | case mpr.inr.intro
B : State → Prop
S : Stmt
s u : State
hB : ¬B s
hus : u = s
⊢ (Stmt.whileDo B S, s) ⟹ s |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | apply BigStep.while_false | case mpr.inr.intro
B : State → Prop
S : Stmt
s u : State
hB : ¬B s
hus : u = s
⊢ (Stmt.whileDo B S, s) ⟹ s | case mpr.inr.intro.hcond
B : State → Prop
S : Stmt
s u : State
hB : ¬B s
hus : u = s
⊢ ¬B s |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_Iff | [343, 1] | [375, 22] | assumption | case mpr.inr.intro.hcond
B : State → Prop
S : Stmt
s u : State
hB : ¬B s
hus : u = s
⊢ ¬B s | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_true_Iff | [377, 9] | [384, 17] | rw [BigStep_while_Iff] | B : State → Prop
S : Stmt
s u : State
hcond : B s
⊢ (Stmt.whileDo B S, s) ⟹ u ↔ ∃ t, (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u | B : State → Prop
S : Stmt
s u : State
hcond : B s
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s ↔ ∃ t, (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_true_Iff | [377, 9] | [384, 17] | simp [hcond] | B : State → Prop
S : Stmt
s u : State
hcond : B s
⊢ (∃ t, B s ∧ (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u) ∨ ¬B s ∧ u = s ↔ ∃ t, (S, s) ⟹ t ∧ (Stmt.whileDo B S, t) ⟹ u | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_false_Iff | [386, 9] | [392, 17] | rw [BigStep_while_Iff] | B : State → Prop
S : Stmt
s t : State
hcond : ¬B s
⊢ (Stmt.whileDo B S, s) ⟹ t ↔ t = s | B : State → Prop
S : Stmt
s t : State
hcond : ¬B s
⊢ (∃ t_1, B s ∧ (S, s) ⟹ t_1 ∧ (Stmt.whileDo B S, t_1) ⟹ t) ∨ ¬B s ∧ t = s ↔ t = s |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.BigStep_while_false_Iff | [386, 9] | [392, 17] | simp [hcond] | B : State → Prop
S : Stmt
s t : State
hcond : ¬B s
⊢ (∃ t_1, B s ∧ (S, s) ⟹ t_1 ∧ (Stmt.whileDo B S, t_1) ⟹ t) ∨ ¬B s ∧ t = s ↔ t = s | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | rw [sillyLoop] | ⊢ RTC SmallStep (sillyLoop, State.update "x" 1 fun x => 0) (Stmt.skip, fun x => 0) | ⊢ RTC SmallStep
(Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.head | ⊢ RTC SmallStep
(Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) | case hab
⊢ (Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?b
case hbc
⊢ RTC SmallStep ?b (Stmt.skip, fun x => 0)
case b
⊢ Stmt × State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply SmallStep.whileDo } | case hab
⊢ (Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?b
case hbc
⊢ RTC SmallStep ?b (Stmt.skip, fun x => 0)
case b
⊢ Stmt × State | case hbc
⊢ RTC SmallStep
(Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply RTC.head
{ apply SmallStep.if_true
simp }
{ apply RTC.head
{ apply SmallStep.seq_step
apply SmallStep.seq_skip }
{ apply RTC.head
{ apply SmallStep.seq_step
apply SmallStep.assign }
{ apply RTC.head
{ apply SmallStep.seq_skip }
{ apply RTC.head
{ apply SmallStep.whileDo }
{ apply RTC.head
{ apply SmallStep.if_false
simp }
{ simp
apply RTC.refl } } } } } } } | case hbc
⊢ RTC SmallStep
(Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.whileDo | case hab
⊢ (Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?b | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.head | case hbc
⊢ RTC SmallStep
(Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) | case hbc.hab
⊢ (Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" 1 fun x => 0) ⇒
?hbc.b
case hbc.hbc
⊢ RTC SmallStep ?hbc.b (Stmt.skip, fun x => 0)
case hbc.b
⊢ Stmt × State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply SmallStep.if_true
simp } | case hbc.hab
⊢ (Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" 1 fun x => 0) ⇒
?hbc.b
case hbc.hbc
⊢ RTC SmallStep ?hbc.b (Stmt.skip, fun x => 0)
case hbc.b
⊢ Stmt × State | case hbc.hbc
⊢ RTC SmallStep
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply RTC.head
{ apply SmallStep.seq_step
apply SmallStep.seq_skip }
{ apply RTC.head
{ apply SmallStep.seq_step
apply SmallStep.assign }
{ apply RTC.head
{ apply SmallStep.seq_skip }
{ apply RTC.head
{ apply SmallStep.whileDo }
{ apply RTC.head
{ apply SmallStep.if_false
simp }
{ simp
apply RTC.refl } } } } } } | case hbc.hbc
⊢ RTC SmallStep
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.if_true | case hbc.hab
⊢ (Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" 1 fun x => 0) ⇒
?hbc.b | case hbc.hab.hcond
⊢ State.update "x" 1 (fun x => 0) "x" > State.update "x" 1 (fun x => 0) "y" |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | simp | case hbc.hab.hcond
⊢ State.update "x" 1 (fun x => 0) "x" > State.update "x" 1 (fun x => 0) "y" | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.head | case hbc.hbc
⊢ RTC SmallStep
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) | case hbc.hbc.hab
⊢ ((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?hbc.hbc.b
case hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.b
⊢ Stmt × State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply SmallStep.seq_step
apply SmallStep.seq_skip } | case hbc.hbc.hab
⊢ ((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?hbc.hbc.b
case hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.b
⊢ Stmt × State | case hbc.hbc.hbc
⊢ RTC SmallStep
((Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply RTC.head
{ apply SmallStep.seq_step
apply SmallStep.assign }
{ apply RTC.head
{ apply SmallStep.seq_skip }
{ apply RTC.head
{ apply SmallStep.whileDo }
{ apply RTC.head
{ apply SmallStep.if_false
simp }
{ simp
apply RTC.refl } } } } } | case hbc.hbc.hbc
⊢ RTC SmallStep
((Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.seq_step | case hbc.hbc.hab
⊢ ((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?hbc.hbc.b | case hbc.hbc.hab.hS
⊢ (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1, State.update "x" 1 fun x => 0) ⇒ (?hbc.hbc.hab.S', ?hbc.hbc.hab.s')
case hbc.hbc.hab.S'
⊢ Stmt
case hbc.hbc.hab.s'
⊢ State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.seq_skip | case hbc.hbc.hab.hS
⊢ (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1, State.update "x" 1 fun x => 0) ⇒ (?hbc.hbc.hab.S', ?hbc.hbc.hab.s')
case hbc.hbc.hab.S'
⊢ Stmt
case hbc.hbc.hab.s'
⊢ State | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.head | case hbc.hbc.hbc
⊢ RTC SmallStep
((Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0)
(Stmt.skip, fun x => 0) | case hbc.hbc.hbc.hab
⊢ ((Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.b
⊢ Stmt × State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply SmallStep.seq_step
apply SmallStep.assign } | case hbc.hbc.hbc.hab
⊢ ((Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.b
⊢ Stmt × State | case hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.skip; Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply RTC.head
{ apply SmallStep.seq_skip }
{ apply RTC.head
{ apply SmallStep.whileDo }
{ apply RTC.head
{ apply SmallStep.if_false
simp }
{ simp
apply RTC.refl } } } } | case hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.skip; Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.seq_step | case hbc.hbc.hbc.hab
⊢ ((Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" 1 fun x => 0) ⇒
?hbc.hbc.hbc.b | case hbc.hbc.hbc.hab.hS
⊢ (Stmt.assign "x" fun s => s "x" - 1, State.update "x" 1 fun x => 0) ⇒ (?hbc.hbc.hbc.hab.S', ?hbc.hbc.hbc.hab.s')
case hbc.hbc.hbc.hab.S'
⊢ Stmt
case hbc.hbc.hbc.hab.s'
⊢ State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.assign | case hbc.hbc.hbc.hab.hS
⊢ (Stmt.assign "x" fun s => s "x" - 1, State.update "x" 1 fun x => 0) ⇒ (?hbc.hbc.hbc.hab.S', ?hbc.hbc.hbc.hab.s')
case hbc.hbc.hbc.hab.S'
⊢ Stmt
case hbc.hbc.hbc.hab.s'
⊢ State | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.head | case hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.skip; Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | case hbc.hbc.hbc.hbc.hab
⊢ (Stmt.skip; Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.hbc.b
⊢ Stmt × State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply SmallStep.seq_skip } | case hbc.hbc.hbc.hbc.hab
⊢ (Stmt.skip; Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.hbc.b
⊢ Stmt × State | case hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply RTC.head
{ apply SmallStep.whileDo }
{ apply RTC.head
{ apply SmallStep.if_false
simp }
{ simp
apply RTC.refl } } } | case hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.seq_skip | case hbc.hbc.hbc.hbc.hab
⊢ (Stmt.skip; Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.b | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.head | case hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | case hbc.hbc.hbc.hbc.hbc.hab
⊢ (Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.hbc.hbc.b
⊢ Stmt × State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply SmallStep.whileDo } | case hbc.hbc.hbc.hbc.hbc.hab
⊢ (Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.hbc.hbc.b
⊢ Stmt × State | case hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply RTC.head
{ apply SmallStep.if_false
simp }
{ simp
apply RTC.refl } } | case hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.whileDo | case hbc.hbc.hbc.hbc.hbc.hab
⊢ (Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1),
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.hbc.b | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.head | case hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep
(Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | case hbc.hbc.hbc.hbc.hbc.hbc.hab
⊢ (Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.hbc.hbc.hbc.b
⊢ Stmt × State |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { apply SmallStep.if_false
simp } | case hbc.hbc.hbc.hbc.hbc.hbc.hab
⊢ (Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.hbc.hbc.b
case hbc.hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep ?hbc.hbc.hbc.hbc.hbc.hbc.b (Stmt.skip, fun x => 0)
case hbc.hbc.hbc.hbc.hbc.hbc.b
⊢ Stmt × State | case hbc.hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep (Stmt.skip, State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | { simp
apply RTC.refl } | case hbc.hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep (Stmt.skip, State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply SmallStep.if_false | case hbc.hbc.hbc.hbc.hbc.hbc.hab
⊢ (Stmt.ifThenElse (fun s => s "x" > s "y")
((Stmt.skip; Stmt.assign "x" fun s => s "x" - 1);
Stmt.whileDo (fun s => s "x" > s "y") (Stmt.skip; Stmt.assign "x" fun s => s "x" - 1))
Stmt.skip,
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0)) ⇒
?hbc.hbc.hbc.hbc.hbc.hbc.b | case hbc.hbc.hbc.hbc.hbc.hbc.hab.hcond
⊢ ¬State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0) "x" >
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0) "y" |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | simp | case hbc.hbc.hbc.hbc.hbc.hbc.hab.hcond
⊢ ¬State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0) "x" >
State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0) "y" | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | simp | case hbc.hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep (Stmt.skip, State.update "x" (State.update "x" 1 (fun x => 0) "x" - 1) (State.update "x" 1 fun x => 0))
(Stmt.skip, fun x => 0) | case hbc.hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep (Stmt.skip, fun x => 0) (Stmt.skip, fun x => 0) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.sillyLoop_from_1_SmallStep | [464, 1] | [488, 47] | apply RTC.refl | case hbc.hbc.hbc.hbc.hbc.hbc.hbc
⊢ RTC SmallStep (Stmt.skip, fun x => 0) (Stmt.skip, fun x => 0) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | induction S with
| skip =>
simp
intros T t hstep
cases hstep
| assign x a =>
simp
apply Exists.intro Stmt.skip
apply Exists.intro (s[x ↦ a s])
apply SmallStep.assign
| seq S T ihS ihT =>
simp
cases Classical.em (S = Stmt.skip) with
| inl h =>
rw [h]
apply Exists.intro T
apply Exists.intro s
apply SmallStep.seq_skip
| inr h =>
simp [h] at ihS
cases ihS with
| intro S' hS₀ =>
cases hS₀ with
| intro s' hS =>
apply Exists.intro (S'; T)
apply Exists.intro s'
apply SmallStep.seq_step
assumption
| ifThenElse B S T ihS ihT =>
simp
cases Classical.em (B s) with
| inl h =>
apply Exists.intro S
apply Exists.intro s
apply SmallStep.if_true
assumption
| inr h =>
apply Exists.intro T
apply Exists.intro s
apply SmallStep.if_false
assumption
| whileDo B S ih =>
simp
apply Exists.intro
(Stmt.ifThenElse B (S; Stmt.whileDo B S)
Stmt.skip)
apply Exists.intro s
apply SmallStep.whileDo | S : Stmt
s : State
⊢ (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | simp | case skip
s : State
⊢ (¬∃ T t, (Stmt.skip, s) ⇒ (T, t)) ↔ Stmt.skip = Stmt.skip | case skip
s : State
⊢ ∀ (x : Stmt) (x_1 : State), ¬(Stmt.skip, s) ⇒ (x, x_1) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | intros T t hstep | case skip
s : State
⊢ ∀ (x : Stmt) (x_1 : State), ¬(Stmt.skip, s) ⇒ (x, x_1) | case skip
s : State
T : Stmt
t : State
hstep : (Stmt.skip, s) ⇒ (T, t)
⊢ False |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | cases hstep | case skip
s : State
T : Stmt
t : State
hstep : (Stmt.skip, s) ⇒ (T, t)
⊢ False | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | simp | case assign
s : State
x : String
a : State → ℕ
⊢ (¬∃ T t, (Stmt.assign x a, s) ⇒ (T, t)) ↔ Stmt.assign x a = Stmt.skip | case assign
s : State
x : String
a : State → ℕ
⊢ ∃ T t, (Stmt.assign x a, s) ⇒ (T, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro Stmt.skip | case assign
s : State
x : String
a : State → ℕ
⊢ ∃ T t, (Stmt.assign x a, s) ⇒ (T, t) | case assign
s : State
x : String
a : State → ℕ
⊢ ∃ t, (Stmt.assign x a, s) ⇒ (Stmt.skip, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro (s[x ↦ a s]) | case assign
s : State
x : String
a : State → ℕ
⊢ ∃ t, (Stmt.assign x a, s) ⇒ (Stmt.skip, t) | case assign
s : State
x : String
a : State → ℕ
⊢ (Stmt.assign x a, s) ⇒ (Stmt.skip, State.update x (a s) s) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply SmallStep.assign | case assign
s : State
x : String
a : State → ℕ
⊢ (Stmt.assign x a, s) ⇒ (Stmt.skip, State.update x (a s) s) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | simp | case seq
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
⊢ (¬∃ T_1 t, (S; T, s) ⇒ (T_1, t)) ↔ S; T = Stmt.skip | case seq
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | cases Classical.em (S = Stmt.skip) with
| inl h =>
rw [h]
apply Exists.intro T
apply Exists.intro s
apply SmallStep.seq_skip
| inr h =>
simp [h] at ihS
cases ihS with
| intro S' hS₀ =>
cases hS₀ with
| intro s' hS =>
apply Exists.intro (S'; T)
apply Exists.intro s'
apply SmallStep.seq_step
assumption | case seq
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | rw [h] | case seq.inl
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : S = Stmt.skip
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) | case seq.inl
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : S = Stmt.skip
⊢ ∃ T_1 t, (Stmt.skip; T, s) ⇒ (T_1, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro T | case seq.inl
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : S = Stmt.skip
⊢ ∃ T_1 t, (Stmt.skip; T, s) ⇒ (T_1, t) | case seq.inl
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : S = Stmt.skip
⊢ ∃ t, (Stmt.skip; T, s) ⇒ (T, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro s | case seq.inl
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : S = Stmt.skip
⊢ ∃ t, (Stmt.skip; T, s) ⇒ (T, t) | case seq.inl
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : S = Stmt.skip
⊢ (Stmt.skip; T, s) ⇒ (T, s) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply SmallStep.seq_skip | case seq.inl
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : S = Stmt.skip
⊢ (Stmt.skip; T, s) ⇒ (T, s) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | simp [h] at ihS | case seq.inr
s : State
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) | case seq.inr
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
ihS : ∃ T t, (S, s) ⇒ (T, t)
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | cases ihS with
| intro S' hS₀ =>
cases hS₀ with
| intro s' hS =>
apply Exists.intro (S'; T)
apply Exists.intro s'
apply SmallStep.seq_step
assumption | case seq.inr
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
ihS : ∃ T t, (S, s) ⇒ (T, t)
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | cases hS₀ with
| intro s' hS =>
apply Exists.intro (S'; T)
apply Exists.intro s'
apply SmallStep.seq_step
assumption | case seq.inr.intro
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
hS₀ : ∃ t, (S, s) ⇒ (S', t)
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro (S'; T) | case seq.inr.intro.intro
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
s' : State
hS : (S, s) ⇒ (S', s')
⊢ ∃ T_1 t, (S; T, s) ⇒ (T_1, t) | case seq.inr.intro.intro
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
s' : State
hS : (S, s) ⇒ (S', s')
⊢ ∃ t, (S; T, s) ⇒ (S'; T, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro s' | case seq.inr.intro.intro
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
s' : State
hS : (S, s) ⇒ (S', s')
⊢ ∃ t, (S; T, s) ⇒ (S'; T, t) | case seq.inr.intro.intro
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
s' : State
hS : (S, s) ⇒ (S', s')
⊢ (S; T, s) ⇒ (S'; T, s') |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply SmallStep.seq_step | case seq.inr.intro.intro
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
s' : State
hS : (S, s) ⇒ (S', s')
⊢ (S; T, s) ⇒ (S'; T, s') | case seq.inr.intro.intro.hS
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
s' : State
hS : (S, s) ⇒ (S', s')
⊢ (S, s) ⇒ (S', s') |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | assumption | case seq.inr.intro.intro.hS
s : State
S T : Stmt
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬S = Stmt.skip
S' : Stmt
s' : State
hS : (S, s) ⇒ (S', s')
⊢ (S, s) ⇒ (S', s') | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | simp | case ifThenElse
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
⊢ (¬∃ T_1 t, (Stmt.ifThenElse B S T, s) ⇒ (T_1, t)) ↔ Stmt.ifThenElse B S T = Stmt.skip | case ifThenElse
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
⊢ ∃ T_1 t, (Stmt.ifThenElse B S T, s) ⇒ (T_1, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | cases Classical.em (B s) with
| inl h =>
apply Exists.intro S
apply Exists.intro s
apply SmallStep.if_true
assumption
| inr h =>
apply Exists.intro T
apply Exists.intro s
apply SmallStep.if_false
assumption | case ifThenElse
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
⊢ ∃ T_1 t, (Stmt.ifThenElse B S T, s) ⇒ (T_1, t) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro S | case ifThenElse.inl
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : B s
⊢ ∃ T_1 t, (Stmt.ifThenElse B S T, s) ⇒ (T_1, t) | case ifThenElse.inl
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : B s
⊢ ∃ t, (Stmt.ifThenElse B S T, s) ⇒ (S, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro s | case ifThenElse.inl
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : B s
⊢ ∃ t, (Stmt.ifThenElse B S T, s) ⇒ (S, t) | case ifThenElse.inl
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : B s
⊢ (Stmt.ifThenElse B S T, s) ⇒ (S, s) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply SmallStep.if_true | case ifThenElse.inl
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : B s
⊢ (Stmt.ifThenElse B S T, s) ⇒ (S, s) | case ifThenElse.inl.hcond
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : B s
⊢ B s |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | assumption | case ifThenElse.inl.hcond
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : B s
⊢ B s | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro T | case ifThenElse.inr
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬B s
⊢ ∃ T_1 t, (Stmt.ifThenElse B S T, s) ⇒ (T_1, t) | case ifThenElse.inr
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬B s
⊢ ∃ t, (Stmt.ifThenElse B S T, s) ⇒ (T, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro s | case ifThenElse.inr
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬B s
⊢ ∃ t, (Stmt.ifThenElse B S T, s) ⇒ (T, t) | case ifThenElse.inr
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬B s
⊢ (Stmt.ifThenElse B S T, s) ⇒ (T, s) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply SmallStep.if_false | case ifThenElse.inr
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬B s
⊢ (Stmt.ifThenElse B S T, s) ⇒ (T, s) | case ifThenElse.inr.hcond
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬B s
⊢ ¬B s |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | assumption | case ifThenElse.inr.hcond
s : State
B : State → Prop
S T : Stmt
ihS : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
ihT : (¬∃ T_1 t, (T, s) ⇒ (T_1, t)) ↔ T = Stmt.skip
h : ¬B s
⊢ ¬B s | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | simp | case whileDo
s : State
B : State → Prop
S : Stmt
ih : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
⊢ (¬∃ T t, (Stmt.whileDo B S, s) ⇒ (T, t)) ↔ Stmt.whileDo B S = Stmt.skip | case whileDo
s : State
B : State → Prop
S : Stmt
ih : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
⊢ ∃ T t, (Stmt.whileDo B S, s) ⇒ (T, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro
(Stmt.ifThenElse B (S; Stmt.whileDo B S)
Stmt.skip) | case whileDo
s : State
B : State → Prop
S : Stmt
ih : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
⊢ ∃ T t, (Stmt.whileDo B S, s) ⇒ (T, t) | case whileDo
s : State
B : State → Prop
S : Stmt
ih : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
⊢ ∃ t, (Stmt.whileDo B S, s) ⇒ (Stmt.ifThenElse B (S; Stmt.whileDo B S) Stmt.skip, t) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply Exists.intro s | case whileDo
s : State
B : State → Prop
S : Stmt
ih : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
⊢ ∃ t, (Stmt.whileDo B S, s) ⇒ (Stmt.ifThenElse B (S; Stmt.whileDo B S) Stmt.skip, t) | case whileDo
s : State
B : State → Prop
S : Stmt
ih : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
⊢ (Stmt.whileDo B S, s) ⇒ (Stmt.ifThenElse B (S; Stmt.whileDo B S) Stmt.skip, s) |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_final | [509, 1] | [560, 30] | apply SmallStep.whileDo | case whileDo
s : State
B : State → Prop
S : Stmt
ih : (¬∃ T t, (S, s) ⇒ (T, t)) ↔ S = Stmt.skip
⊢ (Stmt.whileDo B S, s) ⇒ (Stmt.ifThenElse B (S; Stmt.whileDo B S) Stmt.skip, s) | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_deterministic | [562, 1] | [592, 23] | induction hl generalizing Rr with
| assign x a s =>
cases hr with
| assign _ _ _ => rfl
| seq_step S S₁ T s s₁ hS₁ ih =>
cases hr with
| seq_step S S₂ _ _ s₂ hS₂ =>
have hSs₁₂ :=
ih hS₂
aesop
| seq_skip => cases hS₁
| seq_skip T s =>
cases hr with
| seq_step _ S _ _ s' hskip => cases hskip
| seq_skip => rfl
| if_true B S T s hB =>
cases hr with
| if_true => rfl
| if_false => aesop
| if_false B S T s hB =>
cases hr with
| if_true => aesop
| if_false => rfl
| whileDo B S s =>
cases hr with
| whileDo => rfl | Ss Ll Rr : Stmt × State
hl : Ss ⇒ Ll
hr : Ss ⇒ Rr
⊢ Ll = Rr | no goals |
https://github.com/BrownCS1951x/fpv2023.git | 9aaf6b5c454aa9a70fc4e6807adf3123b001ea66 | LoVe/Lectures/LoVe09_OperationalSemantics_Demo.lean | LoVe.SmallStep_deterministic | [562, 1] | [592, 23] | cases hr with
| assign _ _ _ => rfl | case assign
Ss Ll : Stmt × State
x : String
a : State → ℕ
s : State
Rr : Stmt × State
hr : (Stmt.assign x a, s) ⇒ Rr
⊢ (Stmt.skip, State.update x (a s) s) = Rr | no goals |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.