Skip to content

Commit f4145cf

Browse files
SnO2WMaNclaude
andcommitted
fix: Balloon.leanRank.lean の解消不能な overlappingInstances 警告を明示的に抑制
`Frame.IsBalloon`・`Frame.IsTree` は,親クラス(`IsStrictTotalOrder`・`IsTransitive`) のインスタンスを型を書くために先に明示指定する必要があり,`extends`で束ねられた インスタンスと構造的に重複してしまう.`omit`は`def`/`instance`や,型が依存変数を 参照する`lemma`には効かず,`variable`側から外すと広範囲の宣言に影響するため, 該当宣言にのみ`set_option linter.overlappingInstances false in`を付与し, 理由をコメントで明記した.意味・シグネチャは不変. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9d173a1 commit f4145cf

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Foundation/Modal/Kripke/Balloon.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ open Formula.Kripke
1818

1919
variable {F : Frame} [IsStrictTotalOrder _ F] {e : Cluster F} [F.IsBalloon e] {x : F.World} {φ : Formula ℕ}
2020

21+
-- `[IsStrictTotalOrder _ F]` must be given explicitly before `e : Cluster F` can even be stated,
22+
-- so it cannot avoid overlapping with the `IsStrictTotalOrder` bundled inside `[F.IsBalloon e]`.
23+
set_option linter.overlappingInstances false in
2124
/-- Every points in enverope is reflexive. -/
2225
lemma rfl_in_envelope (hx : x ∈ e) : x ≺ x := Cluster.refl_of_mem_non_degenerate (envelope_non_degenerated) hx
2326

27+
set_option linter.overlappingInstances false in
2428
/-- Every point in balloon can see all points in envelope. -/
2529
lemma covered_in_envelope (x : F.World) : ∀ t ∈ e, x ≺ t := by
2630
obtain ⟨t₁, rfl⟩ := Quotient.exists_rep e;
@@ -41,6 +45,7 @@ lemma covered_in_envelope (x : F.World) : ∀ t ∈ e, x ≺ t := by
4145
. have := IsTerminated.direct_terminated_of_trans (F := F.strictSkelteon) (t := ⟦t₁⟧) ⟦x⟧ ext₁;
4246
exact _root_.trans this.1 Rt₁₂;
4347

48+
set_option linter.overlappingInstances false in
4449
/-- Every points from enverope is in enverope. -/
4550
lemma in_envelope_of_in_envelope (hx : x ∈ e) : ∀ {y}, x ≺ y → y ∈ e := by
4651
obtain ⟨t, rfl⟩ := Quotient.exists_rep e;
@@ -66,6 +71,9 @@ end Frame.IsBalloon
6671
lemma farthermost_point_of_not_box {M : Kripke.Model} [IsStrictOrder _ M.toFrame] {x : M} (h : ¬x ⊧ □φ) : ∃ y, x ≺ y ∧ ¬y ⊧ φ ∧ y ⊧ □φ := by
6772
sorry;
6873

74+
-- `[F.IsTransitive]` is a required prior argument of the `Frame.IsBalloon` class itself,
75+
-- so it cannot avoid overlapping with the `IsTransitive` bundled inside `[F.IsBalloon e]`.
76+
set_option linter.overlappingInstances false in
6977
open
7078
Formula.Kripke
7179
Frame.IsBalloon

Foundation/Modal/Kripke/Rank.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ namespace pointGenerate
181181
open Classical in
182182
instance : Fintype (F↾x) := by apply Subtype.fintype;
183183

184+
-- the outer `variable [F.IsTransitive]` is needed by unrelated declarations in this section,
185+
-- so it cannot avoid overlapping with the `IsTransitive` bundled inside `[F.IsTree]` here.
186+
set_option linter.overlappingInstances false in
184187
instance [F.IsTree] : (F↾x).IsTree := by constructor;
185188

186189
axiom eq_original_height (hxy : y = x ∨ x ≺ y) : Frame.rank (F := F↾x) (⟨y, hxy⟩) = Frame.rank y

0 commit comments

Comments
 (0)