Skip to content

Commit be738a8

Browse files
authored
style: fix bad indents (#418)
Theorem statements and their binders should always be indented four spaces or more
1 parent ef87c06 commit be738a8

13 files changed

Lines changed: 115 additions & 116 deletions

File tree

Cslib/Algorithms/Lean/MergeSort/MergeSort.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ theorem mergeSort_time_le (xs : List α) :
198198

199199
/-- Time complexity of mergeSort -/
200200
theorem mergeSort_time (xs : List α) :
201-
let n := xs.length
202-
(mergeSort xs).time ≤ n * clog 2 n := by
201+
let n := xs.length
202+
(mergeSort xs).time ≤ n * clog 2 n := by
203203
grind [mergeSort_time_le, timeMergeSortRec_le]
204204

205205
end TimeComplexity

Cslib/Computability/Automata/NA/Hist.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ theorem hist_run_proj {xs : ωSequence Symbol} {ss : ωSequence (State × Hist)}
4545
/-- Given a run of the original automaton, `makeHist` builds a run of the history state. -/
4646
@[scoped grind =]
4747
def makeHist (start' : State → Hist) (tr' : State × Hist → Symbol → State → Hist)
48-
(xs : ωSequence Symbol) (ss : ωSequence State) : ℕ → Hist
48+
(xs : ωSequence Symbol) (ss : ωSequence State) : ℕ → Hist
4949
| 0 => start' (ss 0)
5050
| n + 1 => tr' (ss n, makeHist start' tr' xs ss n) (xs n) (ss (n + 1))
5151

Cslib/Foundations/Control/Monad/Free/Fold.lean

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,26 @@ namespace FreeM
4848
variable {F : Type u → Type v} {ι : Type u} {α : Type w} {β : Type w'}
4949

5050
/-- Fold function for the `FreeM` monad -/
51-
def foldFreeM {F : Type u → Type v} {α β : Type w}
52-
(onValue : α → β)
53-
(onEffect : {ι : Type u} → F ι → (ι → β) → β)
54-
: FreeM F α → β
51+
def foldFreeM
52+
(onValue : α → β)
53+
(onEffect : {ι : Type u} → F ι → (ι → β) → β) :
54+
FreeM F α → β
5555
| .pure a => onValue a
5656
| .liftBind op k => onEffect op (fun x => foldFreeM onValue onEffect (k x))
5757

5858
@[simp]
59-
theorem foldFreeM_pure {F : Type u → Type v} {α β : Type w}
60-
(onValue : α → β)
61-
(onEffect : {ι : Type u} → F ι → (ι → β) → β)
62-
(a : α) : foldFreeM onValue onEffect (.pure a) = onValue a := rfl
59+
theorem foldFreeM_pure
60+
(onValue : α → β)
61+
(onEffect : {ι : Type u} → F ι → (ι → β) → β)
62+
(a : α) : foldFreeM onValue onEffect (.pure a) = onValue a := rfl
6363

6464
@[simp]
65-
theorem foldFreeM_liftBind {F : Type u → Type v} {α β : Type w}
66-
(onValue : α → β)
67-
(onEffect : {ι : Type u} → F ι → (ι → β) → β)
68-
(op : F ι) (k : ι → FreeM F α) :
65+
theorem foldFreeM_liftBind
66+
(onValue : α → β)
67+
(onEffect : {ι : Type u} → F ι → (ι → β) → β)
68+
(op : F ι) (k : ι → FreeM F α) :
6969
foldFreeM onValue onEffect (.liftBind op k)
70-
= onEffect op (fun x => foldFreeM onValue onEffect (k x)) := rfl
70+
= onEffect op (fun x => foldFreeM onValue onEffect (k x)) := rfl
7171

7272
/--
7373
**Universal Property**: If `h : FreeM F α → β` satisfies:
@@ -77,15 +77,13 @@ theorem foldFreeM_liftBind {F : Type u → Type v} {α β : Type w}
7777
then `h` is equal to `foldFreeM onValue onEffect`.
7878
-/
7979
theorem foldFreeM_unique
80-
{F : Type u → Type v} {α : Type w} {β : Type w}
81-
(onValue : α → β)
82-
(onEffect : {ι : Type u} → F ι → (ι → β) → β)
83-
(h : FreeM F α → β)
84-
(h_pure : ∀ a, h (.pure a) = onValue a)
85-
(h_liftBind : ∀ {ι} (op : F ι) (k : ι → FreeM F α),
86-
h (.liftBind op k) = onEffect op (fun x => h (k x))) :
87-
h = foldFreeM onValue onEffect :=
88-
by
80+
(onValue : α → β)
81+
(onEffect : {ι : Type u} → F ι → (ι → β) → β)
82+
(h : FreeM F α → β)
83+
(h_pure : ∀ a, h (.pure a) = onValue a)
84+
(h_liftBind : ∀ {ι} (op : F ι) (k : ι → FreeM F α),
85+
h (.liftBind op k) = onEffect op (fun x => h (k x))) :
86+
h = foldFreeM onValue onEffect := by
8987
funext x
9088
induction x with
9189
| pure a =>

Cslib/Foundations/Semantics/LTS/Basic.lean

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ theorem LTS.deterministic_tr_image_singleton [lts.Deterministic] :
659659
/-- In a deterministic LTS, any image is either a singleton or the empty set. -/
660660
@[scoped grind .]
661661
theorem LTS.deterministic_image_char [lts.Deterministic] (s : State) (μ : Label) :
662-
(∃ s', lts.image s μ = { s' }) ∨ (lts.image s μ = ∅) := by grind
662+
(∃ s', lts.image s μ = { s' }) ∨ (lts.image s μ = ∅) := by grind
663663

664664
/-- In a deterministic LTS, the image of any state-label combination is finite. -/
665665
instance [lts.Deterministic] (s : State) (μ : Label) : Finite (lts.image s μ) := by
@@ -777,9 +777,9 @@ theorem LTS.sTr_sTrN [HasTau Label] (lts : LTS State Label) :
777777
/-- Saturated transitions labelled by τ can be composed (weighted version). -/
778778
@[scoped grind →]
779779
theorem LTS.STrN.trans_τ
780-
[HasTau Label] (lts : LTS State Label)
781-
(h1 : lts.STrN n s1 HasTau.τ s2) (h2 : lts.STrN m s2 HasTau.τ s3) :
782-
lts.STrN (n + m) s1 HasTau.τ s3 := by
780+
[HasTau Label] (lts : LTS State Label)
781+
(h1 : lts.STrN n s1 HasTau.τ s2) (h2 : lts.STrN m s2 HasTau.τ s3) :
782+
lts.STrN (n + m) s1 HasTau.τ s3 := by
783783
cases h1
784784
case refl => grind
785785
case tr n1 sb sb' n2 hstr1 htr hstr2 =>
@@ -790,9 +790,9 @@ theorem LTS.STrN.trans_τ
790790
/-- Saturated transitions labelled by τ can be composed. -/
791791
@[scoped grind →]
792792
theorem LTS.STr.trans_τ
793-
[HasTau Label] (lts : LTS State Label)
794-
(h1 : lts.STr s1 HasTau.τ s2) (h2 : lts.STr s2 HasTau.τ s3) :
795-
lts.STr s1 HasTau.τ s3 := by
793+
[HasTau Label] (lts : LTS State Label)
794+
(h1 : lts.STr s1 HasTau.τ s2) (h2 : lts.STr s2 HasTau.τ s3) :
795+
lts.STr s1 HasTau.τ s3 := by
796796
obtain ⟨n, h1N⟩ := (LTS.sTr_sTrN lts).1 h1
797797
obtain ⟨m, h2N⟩ := (LTS.sTr_sTrN lts).1 h2
798798
have concN := LTS.STrN.trans_τ lts h1N h2N
@@ -801,10 +801,10 @@ theorem LTS.STr.trans_τ
801801
/-- Saturated transitions can be appended with τ-transitions (weighted version). -/
802802
@[scoped grind <=]
803803
theorem LTS.STrN.append
804-
[HasTau Label] (lts : LTS State Label)
805-
(h1 : lts.STrN n1 s1 μ s2)
806-
(h2 : lts.STrN n2 s2 HasTau.τ s3) :
807-
lts.STrN (n1 + n2) s1 μ s3 := by
804+
[HasTau Label] (lts : LTS State Label)
805+
(h1 : lts.STrN n1 s1 μ s2)
806+
(h2 : lts.STrN n2 s2 HasTau.τ s3) :
807+
lts.STrN (n1 + n2) s1 μ s3 := by
808808
cases h1
809809
case refl => grind
810810
case tr n11 sb sb' n12 hstr1 htr hstr2 =>
@@ -816,11 +816,11 @@ theorem LTS.STrN.append
816816
/-- Saturated transitions can be composed (weighted version). -/
817817
@[scoped grind <=]
818818
theorem LTS.STrN.comp
819-
[HasTau Label] (lts : LTS State Label)
820-
(h1 : lts.STrN n1 s1 HasTau.τ s2)
821-
(h2 : lts.STrN n2 s2 μ s3)
822-
(h3 : lts.STrN n3 s3 HasTau.τ s4) :
823-
lts.STrN (n1 + n2 + n3) s1 μ s4 := by
819+
[HasTau Label] (lts : LTS State Label)
820+
(h1 : lts.STrN n1 s1 HasTau.τ s2)
821+
(h2 : lts.STrN n2 s2 μ s3)
822+
(h3 : lts.STrN n3 s3 HasTau.τ s4) :
823+
lts.STrN (n1 + n2 + n3) s1 μ s4 := by
824824
cases h2
825825
case refl =>
826826
apply LTS.STrN.trans_τ lts h1 h3
@@ -833,11 +833,11 @@ theorem LTS.STrN.comp
833833
/-- Saturated transitions can be composed. -/
834834
@[scoped grind <=]
835835
theorem LTS.STr.comp
836-
[HasTau Label] (lts : LTS State Label)
837-
(h1 : lts.STr s1 HasTau.τ s2)
838-
(h2 : lts.STr s2 μ s3)
839-
(h3 : lts.STr s3 HasTau.τ s4) :
840-
lts.STr s1 μ s4 := by
836+
[HasTau Label] (lts : LTS State Label)
837+
(h1 : lts.STr s1 HasTau.τ s2)
838+
(h2 : lts.STr s2 μ s3)
839+
(h3 : lts.STr s3 HasTau.τ s4) :
840+
lts.STr s1 μ s4 := by
841841
obtain ⟨n1, h1N⟩ := (LTS.sTr_sTrN lts).1 h1
842842
obtain ⟨n2, h2N⟩ := (LTS.sTr_sTrN lts).1 h2
843843
obtain ⟨n3, h3N⟩ := (LTS.sTr_sTrN lts).1 h3
@@ -848,7 +848,7 @@ open scoped LTS.STr in
848848
/-- In a saturated LTS, the transition and saturated transition relations are the same. -/
849849
@[scoped grind _=_]
850850
theorem LTS.saturate_sTr_tr [hHasTau : HasTau Label] (lts : LTS State Label)
851-
(hμ : μ = hHasTau.τ) : lts.saturate.Tr s μ = lts.saturate.STr s μ := by
851+
(hμ : μ = hHasTau.τ) : lts.saturate.Tr s μ = lts.saturate.STr s μ := by
852852
ext s'
853853
apply Iff.intro <;> intro h
854854
case mp =>
@@ -894,9 +894,9 @@ def LTS.Divergent [HasTau Label] (lts : LTS State Label) (s : State) : Prop :=
894894
/-- If a trace is divergent, then any 'suffix' is also divergent. -/
895895
@[scoped grind ⇒]
896896
theorem LTS.divergentTrace_drop
897-
[HasTau Label] {μs : ωSequence Label}
898-
(h : DivergentTrace μs) (n : ℕ) :
899-
DivergentTrace (μs.drop n) := by
897+
[HasTau Label] {μs : ωSequence Label}
898+
(h : DivergentTrace μs) (n : ℕ) :
899+
DivergentTrace (μs.drop n) := by
900900
intro m
901901
simp only [DivergentTrace] at h
902902
simp only [ωSequence.get_fun, ωSequence.drop]

Cslib/Foundations/Semantics/LTS/Bisimulation.lean

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ def LTS.IsBisimulation (lts : LTS State Label) (r : State → State → Prop) :
8686

8787
/-- Helper for following a transition by the first state in a pair of a `Bisimulation`. -/
8888
theorem LTS.IsBisimulation.follow_fst
89-
(hb : lts.IsBisimulation r) (hr : r s1 s2) (htr : lts.Tr s1 μ s1') :
90-
∃ s2', lts.Tr s2 μ s2' ∧ r s1' s2' :=
89+
(hb : lts.IsBisimulation r) (hr : r s1 s2) (htr : lts.Tr s1 μ s1') :
90+
∃ s2', lts.Tr s2 μ s2' ∧ r s1' s2' :=
9191
(hb hr μ).1 _ htr
9292

9393
/-- Helper for following a transition by the second state in a pair of a `Bisimulation`. -/
9494
theorem LTS.IsBisimulation.follow_snd
95-
(hb : lts.IsBisimulation r) (hr : r s1 s2) (htr : lts.Tr s2 μ s2') :
96-
∃ s1', lts.Tr s1 μ s1' ∧ r s1' s2' :=
95+
(hb : lts.IsBisimulation r) (hr : r s1 s2) (htr : lts.Tr s2 μ s2') :
96+
∃ s1', lts.Tr s1 μ s1' ∧ r s1' s2' :=
9797
(hb hr μ).2 _ htr
9898

9999
/-- Two states are bisimilar if they are related by some bisimulation. -/
@@ -130,14 +130,14 @@ theorem Bisimilarity.symm {s1 s2 : State} (h : s1 ~[lts] s2) : s2 ~[lts] s1 := b
130130
/-- The composition of two bisimulations is a bisimulation. -/
131131
@[scoped grind .]
132132
theorem LTS.IsBisimulation.comp
133-
(h1 : lts.IsBisimulation r1) (h2 : lts.IsBisimulation r2) :
133+
(h1 : lts.IsBisimulation r1) (h2 : lts.IsBisimulation r2) :
134134
lts.IsBisimulation (Relation.Comp r1 r2) := by grind [Relation.Comp]
135135

136136
open LTS in
137137
/-- Bisimilarity is transitive. -/
138138
@[scoped grind →]
139139
theorem Bisimilarity.trans
140-
(h1 : s1 ~[lts] s2) (h2 : s2 ~[lts] s3) :
140+
(h1 : s1 ~[lts] s2) (h2 : s2 ~[lts] s3) :
141141
s1 ~[lts] s3 := by
142142
obtain ⟨r1, _, _⟩ := h1
143143
obtain ⟨r2, _, _⟩ := h2
@@ -215,7 +215,7 @@ theorem Bisimilarity.largest_bisimulation (h : lts.IsBisimulation r) :
215215
/-- The union of bisimilarity with any bisimulation is bisimilarity. -/
216216
@[scoped grind =, simp]
217217
theorem Bisimilarity.gfp (r : State → State → Prop) (h : lts.IsBisimulation r) :
218-
(Bisimilarity lts) ⊔ r = Bisimilarity lts := by
218+
(Bisimilarity lts) ⊔ r = Bisimilarity lts := by
219219
funext s1 s2
220220
simp only [max, SemilatticeSup.sup, eq_iff_iff, or_iff_left_iff_imp]
221221
apply Bisimilarity.largest_bisimulation h
@@ -349,8 +349,8 @@ theorem LTS.IsBisimulationUpTo.isBisimulation (h : lts.IsBisimulationUpTo r) :
349349
/-- If two states are related by a bisimulation, they can mimic each other's multi-step
350350
transitions. -/
351351
theorem Bisimulation.bisim_trace
352-
(hb : lts.IsBisimulation r) (hr : r s1 s2) :
353-
∀ μs s1', lts.MTr s1 μs s1' → ∃ s2', lts.MTr s2 μs s2' ∧ r s1' s2' := by
352+
(hb : lts.IsBisimulation r) (hr : r s1 s2) :
353+
∀ μs s1', lts.MTr s1 μs s1' → ∃ s2', lts.MTr s2 μs s2' ∧ r s1' s2' := by
354354
intro μs
355355
induction μs generalizing s1 s2
356356
case nil =>
@@ -383,8 +383,8 @@ theorem Bisimulation.bisim_trace
383383
/-- Any bisimulation implies trace equivalence. -/
384384
@[scoped grind =>]
385385
theorem LTS.IsBisimulation.traceEq
386-
(hb : lts.IsBisimulation r) (hr : r s1 s2) :
387-
s1 ~tr[lts] s2 := by
386+
(hb : lts.IsBisimulation r) (hr : r s1 s2) :
387+
s1 ~tr[lts] s2 := by
388388
funext μs
389389
simp only [eq_iff_iff]
390390
constructor
@@ -424,7 +424,8 @@ private inductive BisimMotTr : ℕ → Char → ℕ → Prop where
424424
/-- In general, trace equivalence is not a bisimulation (extra conditions are needed, see for
425425
example `Bisimulation.deterministic_trace_eq_is_bisim`). -/
426426
theorem Bisimulation.traceEq_not_bisim :
427-
∃ (State : Type) (Label : Type) (lts : LTS State Label), ¬(lts.IsBisimulation (TraceEq lts)) := by
427+
∃ (State : Type) (Label : Type) (lts : LTS State Label),
428+
¬(lts.IsBisimulation (TraceEq lts)) := by
428429
exists
429430
exists Char
430431
let lts := LTS.mk BisimMotTr
@@ -810,9 +811,9 @@ def LTS.IsSWBisimulation [HasTau Label] (lts : LTS State Label) (r : State → S
810811
/-- Utility theorem for 'following' internal transitions using an `SWBisimulation`
811812
(first component, weighted version). -/
812813
theorem SWBisimulation.follow_internal_fst_n
813-
[HasTau Label] {lts : LTS State Label}
814-
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstrN : lts.STrN n s1 HasTau.τ s1') :
815-
∃ s2', lts.STr s2 HasTau.τ s2' ∧ r s1' s2' := by
814+
[HasTau Label] {lts : LTS State Label}
815+
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstrN : lts.STrN n s1 HasTau.τ s1') :
816+
∃ s2', lts.STr s2 HasTau.τ s2' ∧ r s1' s2' := by
816817
cases n
817818
case zero =>
818819
cases hstrN
@@ -837,9 +838,9 @@ theorem SWBisimulation.follow_internal_fst_n
837838
/-- Utility theorem for 'following' internal transitions using an `SWBisimulation`
838839
(second component, weighted version). -/
839840
theorem SWBisimulation.follow_internal_snd_n
840-
[HasTau Label] {lts : LTS State Label}
841-
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstrN : lts.STrN n s2 HasTau.τ s2') :
842-
∃ s1', lts.STr s1 HasTau.τ s1' ∧ r s1' s2' := by
841+
[HasTau Label] {lts : LTS State Label}
842+
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstrN : lts.STrN n s2 HasTau.τ s2') :
843+
∃ s1', lts.STr s1 HasTau.τ s1' ∧ r s1' s2' := by
843844
cases n
844845
case zero =>
845846
cases hstrN
@@ -864,26 +865,26 @@ theorem SWBisimulation.follow_internal_snd_n
864865
/-- Utility theorem for 'following' internal transitions using an `SWBisimulation`
865866
(first component). -/
866867
theorem SWBisimulation.follow_internal_fst
867-
[HasTau Label] {lts : LTS State Label}
868-
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstr : lts.STr s1 HasTau.τ s1') :
869-
∃ s2', lts.STr s2 HasTau.τ s2' ∧ r s1' s2' := by
868+
[HasTau Label] {lts : LTS State Label}
869+
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstr : lts.STr s1 HasTau.τ s1') :
870+
∃ s2', lts.STr s2 HasTau.τ s2' ∧ r s1' s2' := by
870871
obtain ⟨n, hstrN⟩ := (LTS.sTr_sTrN lts).1 hstr
871872
apply SWBisimulation.follow_internal_fst_n hswb hr hstrN
872873

873874
/-- Utility theorem for 'following' internal transitions using an `SWBisimulation`
874875
(second component). -/
875876
theorem SWBisimulation.follow_internal_snd
876-
[HasTau Label] {lts : LTS State Label}
877-
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstr : lts.STr s2 HasTau.τ s2') :
878-
∃ s1', lts.STr s1 HasTau.τ s1' ∧ r s1' s2' := by
877+
[HasTau Label] {lts : LTS State Label}
878+
(hswb : lts.IsSWBisimulation r) (hr : r s1 s2) (hstr : lts.STr s2 HasTau.τ s2') :
879+
∃ s1', lts.STr s1 HasTau.τ s1' ∧ r s1' s2' := by
879880
obtain ⟨n, hstrN⟩ := (LTS.sTr_sTrN lts).1 hstr
880881
apply SWBisimulation.follow_internal_snd_n hswb hr hstrN
881882

882883
/-- We can now prove that any relation is a `WeakBisimulation` iff it is an `SWBisimulation`.
883884
This formalises lemma 4.2.10 in [Sangiorgi2011]. -/
884885
theorem LTS.isWeakBisimulation_iff_isSWBisimulation
885-
[HasTau Label] {lts : LTS State Label} :
886-
lts.IsWeakBisimulation r ↔ lts.IsSWBisimulation r := by
886+
[HasTau Label] {lts : LTS State Label} :
887+
lts.IsWeakBisimulation r ↔ lts.IsSWBisimulation r := by
887888
apply Iff.intro
888889
case mp =>
889890
intro h s1 s2 hr μ
@@ -959,8 +960,8 @@ theorem WeakBisimilarity.refl [HasTau Label] (lts : LTS State Label) (s : State)
959960

960961
/-- The inverse of a weak bisimulation is a weak bisimulation. -/
961962
theorem WeakBisimulation.inv [HasTau Label] (lts : LTS State Label)
962-
(r : State → State → Prop) (h : lts.IsWeakBisimulation r) :
963-
lts.IsWeakBisimulation (flip r) := by
963+
(r : State → State → Prop) (h : lts.IsWeakBisimulation r) :
964+
lts.IsWeakBisimulation (flip r) := by
964965
grind [WeakBisimulation.toSwBisimulation, LTS.IsSWBisimulation,
965966
flip, SWBisimulation.toWeakBisimulation]
966967

@@ -973,19 +974,20 @@ theorem WeakBisimilarity.symm [HasTau Label] (lts : LTS State Label) (h : s1 ≈
973974

974975
/-- The composition of two weak bisimulations is a weak bisimulation. -/
975976
theorem WeakBisimulation.comp
976-
[HasTau Label]
977-
(lts : LTS State Label)
978-
(r1 r2 : State → State → Prop) (h1 : lts.IsWeakBisimulation r1) (h2 : lts.IsWeakBisimulation r2) :
979-
lts.IsWeakBisimulation (Relation.Comp r1 r2) := by
977+
[HasTau Label]
978+
(lts : LTS State Label)
979+
(r1 r2 : State → State → Prop)
980+
(h1 : lts.IsWeakBisimulation r1) (h2 : lts.IsWeakBisimulation r2) :
981+
lts.IsWeakBisimulation (Relation.Comp r1 r2) := by
980982
simp_all only [LTS.IsWeakBisimulation]
981983
exact h1.comp h2
982984

983985
/-- The composition of two sw-bisimulations is an sw-bisimulation. -/
984986
theorem SWBisimulation.comp
985-
[HasTau Label]
986-
(lts : LTS State Label)
987-
(r1 r2 : State → State → Prop) (h1 : lts.IsSWBisimulation r1) (h2 : lts.IsSWBisimulation r2) :
988-
lts.IsSWBisimulation (Relation.Comp r1 r2) := by
987+
[HasTau Label]
988+
(lts : LTS State Label)
989+
(r1 r2 : State → State → Prop) (h1 : lts.IsSWBisimulation r1) (h2 : lts.IsSWBisimulation r2) :
990+
lts.IsSWBisimulation (Relation.Comp r1 r2) := by
989991
simp_all only [LTS.isWeakBisimulation_iff_isSWBisimulation.symm]
990992
apply WeakBisimulation.comp lts r1 r2 h1 h2
991993

@@ -1003,11 +1005,10 @@ theorem WeakBisimilarity.trans [HasTau Label] {s1 s2 s3 : State}
10031005

10041006
/-- Weak bisimilarity is an equivalence relation. -/
10051007
theorem WeakBisimilarity.eqv [HasTau Label] {lts : LTS State Label} :
1006-
Equivalence (WeakBisimilarity lts) := {
1007-
refl := WeakBisimilarity.refl lts
1008-
symm := WeakBisimilarity.symm lts
1009-
trans := WeakBisimilarity.trans lts
1010-
}
1008+
Equivalence (WeakBisimilarity lts) where
1009+
refl := WeakBisimilarity.refl lts
1010+
symm := WeakBisimilarity.symm lts
1011+
trans := WeakBisimilarity.trans lts
10111012

10121013
end WeakBisimulation
10131014

Cslib/Foundations/Semantics/LTS/Simulation.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ theorem Similarity.refl (s : State) : s ≤[lts] s := by
7474

7575
/-- The composition of two simulations is a simulation. -/
7676
theorem Simulation.comp
77-
(r1 r2 : State → State → Prop) (h1 : Simulation lts r1) (h2 : Simulation lts r2) :
78-
Simulation lts (Relation.Comp r1 r2) := by
77+
(r1 r2 : State → State → Prop) (h1 : Simulation lts r1) (h2 : Simulation lts r2) :
78+
Simulation lts (Relation.Comp r1 r2) := by
7979
simp_all only [Simulation]
8080
intro s1 s2 hrc μ s1' htr
8181
rcases hrc with ⟨sb, hr1, hr2⟩

0 commit comments

Comments
 (0)