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.