Skip to content

Commit 6000df7

Browse files
SnO2WMaNclaude
andcommitted
Fix simp regressions in ModalCompanion/Basic after deps update
Version bump broke three proofs that relied on simp computing `2 * (n + 1)` and `Finset.filterMap` over a singleton: - `negRepeat_succ_rw`: factor out `negRepeat_neg` and rewrite the multiplication explicitly before unfolding `negRepeat`. - `notForces_double_negRepeat`: rewrite `2 * (n + 1)` to `2 * n + 1 + 1` so `simp [negRepeat]` can unfold the two negations. - `modal_companion_VFSer`: add `star_singleton_dni` proving `{∼∼⊤}.star = {∼□∼□⊤}` via `ext`, and rewrite with it (plus `Finset.singleton_union`) instead of unfolding `Axioms.star`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent bcd2fc2 commit 6000df7

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

  • VeryWeakSubintuitionistic/ModalCompanion

VeryWeakSubintuitionistic/ModalCompanion/Basic.lean

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,14 @@ def negRepeat : ℕ → Formula α → Formula α
164164

165165
notation "∼^[" n "]" A => negRepeat n A
166166

167-
lemma negRepeat_succ_rw {n : ℕ} : (∼^[2 * (n + 1)]A) = ∼(∼^[2 * n](∼A)) := by
167+
lemma negRepeat_neg {n : ℕ} : (∼^[n](∼A)) = ∼(∼^[n]A) := by
168168
induction n <;> simp_all [negRepeat];
169169

170+
lemma negRepeat_succ_rw {n : ℕ} : (∼^[2 * (n + 1)]A) = ∼(∼^[2 * n](∼A)) := by
171+
rw [negRepeat_neg];
172+
rw [show 2 * (n + 1) = 2 * n + 1 + 1 by omega];
173+
simp [negRepeat];
174+
170175
end Modal.Formula
171176

172177

@@ -202,6 +207,7 @@ lemma notForces_double_negRepeat {M : Model κ α} {x : M.World} : (x ⊩ (∼^[
202207
| zero => grind;
203208
| succ n ih =>
204209
apply Iff.trans ?_ ih;
210+
rw [show 2 * (n + 1) = 2 * n + 1 + 1 by omega];
205211
simp [Modal.Formula.negRepeat];
206212
grind;
207213

@@ -296,14 +302,19 @@ theorem modal_companion_VF {A : Formula α} {N : Finset ℕ} : List.TFAE [
296302
have : Fact (∀ B ∈ (∅ : Axioms α), B.IsClosedNegativeAxiom) := ⟨by grind⟩;
297303
simpa [Axioms.star] using modal_companion (Λ := ∅);
298304

305+
omit [DecidableEq α] in
306+
private lemma star_singleton_dni : ({ (∼∼⊤ : Formula α) } : Axioms α).star = { (∼□∼□⊤ : Modal.Formula α) } := by
307+
ext B;
308+
simp [Axioms.star, Formula.corsi, eq_comm];
309+
299310
/-- Corollary 6.13 -/
300311
theorem modal_companion_VFSer {A : Formula α} {N : Finset ℕ} : List.TFAE [
301312
({(∼∼⊤ : Formula α)}) ⊢ⱽ A,
302313
({(∼□∼□⊤ : Modal.Formula α)}) ⊢ᴺ A.corsi,
303314
(insert (∼□∼□⊤ : Modal.Formula α) (N.image (λ n => ∼□(∼^[2 * n]⊥)))) ⊢ᴺ A.corsi
304315
] := by
305316
have : Fact (∀ B ∈ ({ (∼∼⊤ : Formula α) } : Axioms α), B.IsClosedNegativeAxiom) := ⟨by grind⟩;
306-
simpa [Axioms.star] using modal_companion (Λ := { (∼∼⊤ : Formula α) });
317+
simpa [star_singleton_dni, Finset.singleton_union] using modal_companion (Λ := { (∼∼⊤ : Formula α) });
307318

308319

309320
end

0 commit comments

Comments
 (0)