@@ -5,9 +5,8 @@ import Mathlib.Data.Prod.Lex
5
5
import Mathlib.Data.Vector.Defs
6
6
import Pdl.TableauPath
7
7
import Mathlib.Data.ENat.Defs
8
+
8
9
import Pdl.LocalSoundness
9
- import Pdl.Distance
10
- import Pdl.Measures
11
10
12
11
/-! # Soundness (Section 6) -/
13
12
@@ -164,9 +163,6 @@ theorem nodeAt_companionOf_multisetEq {tab : Tableau .nil X} (s : PathIn tab) lp
164
163
convert k_same
165
164
simp only [List.get_eq_getElem]
166
165
have := PathIn.toHistory_eq_Hist s
167
- have : (tabAt_fst_length_eq_toHistory_length s ▸ k).val = k.val := by
168
- apply Fin.val_eq_val_of_heq
169
- simp
170
166
simp_all
171
167
172
168
/-- Any repeat and companion are both loaded. -/
@@ -465,41 +461,34 @@ theorem ePropB.b {tab : Tableau .nil X} (s t : PathIn tab) :
465
461
exact Relation.ReflTransGen.single comp
466
462
467
463
theorem c_claim {a : Sequent} {tab : Tableau [] a} (t l c : PathIn tab) :
468
- (nodeAt t).isFree → t < l → l ♥ c → t < c := by
469
- intro t_free t_above_l l_hearts_c
470
- have ⟨lpr, tabAt_l_def, c_def⟩ := l_hearts_c
471
- by_contra hyp
472
- have c_above_l : c < l := companion_lt l_hearts_c
473
- have comp_leq_t : c ≤ t := by
474
- rcases path_revEuclidean _ _ _ t_above_l c_above_l with h|h|h
475
- · exact False.elim (hyp h)
476
- · exact Relation.TransGen.to_reflTransGen h
477
- · rw [h]
478
- exact Relation.ReflTransGen.refl
479
- have comp_lt_t : c < t := by
480
- apply Relation.TransGen_of_ReflTransGen comp_leq_t
481
- intro c_eq_t
482
- have c_loaded := (companion_loaded l_hearts_c).2
464
+ (nodeAt t).isFree → t < l → l ♥ c → t < c := by
465
+ intro t_free t_above_l l_hearts_c
466
+ have ⟨lpr, tabAt_l_def, c_def⟩ := l_hearts_c
467
+ by_contra hyp
468
+ have c_above_l : c < l := companion_lt l_hearts_c
469
+ have comp_leq_t : c ≤ t := by
470
+ rcases path_revEuclidean _ _ _ t_above_l c_above_l with h|h|h
471
+ · exact False.elim (hyp h)
472
+ · exact Relation.TransGen.to_reflTransGen h
473
+ · rw [h]
474
+ exact Relation.ReflTransGen.refl
475
+ have ⟨k, k', def_c, def_t, k'_le_k⟩ := exists_rewinds_middle comp_leq_t (Relation.TransGen.to_reflTransGen t_above_l)
476
+ have t_loaded : (nodeAt t).isLoaded := by
477
+ rw [←def_t]
478
+ apply companion_to_repeat_all_loaded lpr tabAt_l_def c_def k'
479
+ apply Fin.le_def.1 at k'_le_k
480
+ have k_is_lpr_succ : k.1 = lpr.1 .1 .succ := by
481
+ have ⟨k_val, k_def⟩ := k
482
+ have ⟨⟨lpr_len, lpr_len_pf⟩, ⟨eq_con, loaded_con⟩⟩ := lpr
483
+ unfold companionOf at c_def
484
+ rw [c_def] at def_c
485
+ have := rewind_is_inj def_c
486
+ simp [Fin.cast] at this
487
+ exact this
488
+ simp_all
483
489
simp [Sequent.isFree] at t_free
484
- rw [←c_eq_t, c_loaded] at t_free
485
- contradiction
486
- have ⟨k, k', def_c, def_t, k'_le_k⟩ := exists_rewinds_middle comp_leq_t (Relation.TransGen.to_reflTransGen t_above_l)
487
- have t_loaded : (nodeAt t).isLoaded := by
488
- rw [←def_t]
489
- apply companion_to_repeat_all_loaded lpr tabAt_l_def c_def k'
490
- apply Fin.le_def.1 at k'_le_k
491
- have k_is_lpr_succ : k.1 = lpr.1 .1 .succ := by
492
- have ⟨k_val, k_def⟩ := k
493
- have ⟨⟨lpr_len, lpr_len_pf⟩, ⟨eq_con, loaded_con⟩⟩ := lpr
494
- unfold companionOf at c_def
495
- rw [c_def] at def_c
496
- have := rewind_is_inj def_c
497
- simp [Fin.cast] at this
498
- exact this
499
- simp_all
500
- simp [Sequent.isFree] at t_free
501
- rw [t_loaded] at t_free
502
- contradiction
490
+ rw [t_loaded] at t_free
491
+ cases t_free
503
492
504
493
theorem ePropB.c {X} {tab : Tableau .nil X} (s t : PathIn tab) :
505
494
(nodeAt s).isFree → s < t → s <ᶜ t := by
@@ -546,7 +535,6 @@ theorem not_cEquiv_of_free_loaded (s t : PathIn tab)
546
535
have l_s : l ◃* s := Relation.ReflTransGen.trans l_t t_s
547
536
cases eq_or_ne l s
548
537
case inl les =>
549
- have := edge_is_strict_ordering sel
550
538
simp_all
551
539
case inr lnes => exact Relation.TransGen_of_ReflTransGen l_s lnes
552
540
case inr shl =>
0 commit comments