four_shore_aggregate_block_criticality
Under the displayed disjoint shore, pooled odd-group and connected factor-critical block assumptions, the aggregate B counts satisfy both the outside-vertex and full-block inequalities.
Statement
theorem four_shore_aggregate_block_criticality {V J : Type*} [Fintype V] [DecidableEq V] [DecidableEq J] (G : SimpleGraph V) [DecidableRel G.Adj] (F B : Fin 4 → Finset V) (E : Finset V) (x y : V) (T : Finset J) (Q : J → Finset V) (hFdis : ∀ i j : Fin 4, i ≠ j → Disjoint (F i) (F j)) (hEdis : ∀ i : Fin 4, Disjoint (F i) E) (hBdis : ∀ i j : Fin 4, i ≠ j → Disjoint (B i) (B j)) (hBcover : (Finset.univ : Finset (Fin 4)).biUnion B = Finset.univ) (hEB : E ⊆ B 1) (hx : x ∈ B 0) (hy : y ∈ B 2) (hcross : ∀ i l : Fin 4, i ≠ l → ∀ a ∈ F i, ∀ b ∈ F l, G.Adj a b → (i=0 ∧ l=1 ∧ a=x ∧ b=y) ∨ (i=1 ∧ l=0 ∧ a=y ∧ b=x)) (hEanti : ∀ i : Fin 4, ∀ a ∈ F i, ∀ w ∈ E, ¬ G.Adj a w) (hQodd : ∀ j ∈ T, Odd (Q j).card) (hQdis : ∀ i ∈ T, ∀ j ∈ T, i ≠ j → Disjoint (Q i) (Q j)) (hQanti : ∀ i ∈ T, ∀ j ∈ T, i ≠ j → ∀ a ∈ Q i, ∀ b ∈ Q j, ¬ G.Adj a b) (hQcover : T.biUnion Q = E) (hcrit : is_k_factor_critical (G.induce {v | v ∈ B 1}) 1) (hconn : (G.induce {v | v ∈ B 1}).Connected) : let g : Fin 4 → Fin 4 → ℕ := fun i b => (F i ∩ B b).card let tot := (∑ i : Fin 4, g i 1) + E.card (tot < (B 1).card → T.card + tot + 1 ≤ (B 1).card) ∧ (tot = (B 1).card → T.card ≤ 1 ∧ (∑ i : Fin 4, if 1 ≤ g i 1 then 1 else 0) + T.card ≤ 1)
- Source
- OP-1957; positive-separator factor-critical block count transfer.
- Verified
- 26 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- is_k_factor_criticalA simple graph G on a finite vertex type V is k-factor-critical if for every subset S of V with cardinality k, the induced subgraph on Sᶜ…
- op1957_four_shore_aggregate_totalsFour shore aggregate totals.
- op1957_factorcritical_block_two_family_countFactorcritical block two family count.
- Used by 6
- boundary_five_odd_positive_barrier_forces_patterns_with_extendibilityThe displayed positive-barrier defect patterns hold under the original saturated five-by-odd assumptions together with explicit…
- boundary_five_odd_positive_large_shore_forces_common_defectsUnder the displayed saturated five-by-odd partition, extendibility, independence, degree and separator hypotheses, a positive barrier…
- op1957_one_defect_empty_barrier_impossibleIn the displayed five-by-odd partition with degree, separator and factor-criticality hypotheses, two disjoint endpoint shores covering 2k…
- boundary_five_odd_positive_small_shore_forces_independent_tripleUnder the displayed saturated five-by-odd partition, extendibility, independence, degree and separator hypotheses, a positive barrier…
- op1957_small_shore_four_group_numeric_assemblyFor four anticomplete shores and a B-only pool under the displayed saturated five-by-odd, degree, separator, extendibility, independence…
- boundary_five_odd_large_shore_B_only_positive_barrier_impossibleUnder the displayed five-by-odd partition, degree, separator and connected factor-critical block conditions, a positive barrier supported…
The proof, explained
The theorem proves the outside-vertex and full-block aggregate inequalities on block B 1 by reducing them to the general two-family counting theorem for connected 1-factor-critical subgraphs (op1957_factorcritical_block_two_family_count). The vertices of interest in B 1 are partitioned into the restricted shores P i = F i ∩ B 1 and the odd groups Q j ⊆ E. The key observation is that all cross-edges between different shores F i, F j must have endpoints at x ∈ B 0 or y ∈ B 2; because the blocks are pairwise disjoint, neither x nor y lies in B 1, so there are no edges between different P i inside B 1. Together with the anti-edge hypotheses on E and between odd groups, all separation hypotheses of the two-family lemma are verified, and substituting the aggregate total count via op1957_four_shore_aggregate_totals concludes the proof.
Define the combined set R = (⋃ i, F i) ∪ E and the restricted shore family P i = F i ∩ B 1 for i ∈ Fin 4.
The proof switches to classical logic and simplifies the goal. It introduces the set R containing all shore vertices and pooled vertices E, and defines P i as the restriction of shore F i to the target block B 1.
classical dsimp only let R := (Finset.univ : Finset (Fin 4)).biUnion F ∪ E let P : Fin 4 → Finset V := fun i => F i ∩ B 1
Each odd group Q j (for j ∈ T) and each restricted shore P i (for i ∈ Fin 4) is contained in B 1 ∩ R.
Since E = ⋃ j ∈ T, Q j, every Q j is a subset of E. Because E ⊆ B 1 and E ⊆ R, each Q j is a subset of B 1 ∩ R. Likewise, each P i = F i ∩ B 1 is contained in B 1, and since F i ⊆ ⋃ k, F k ⊆ R, it follows that P i ⊆ B 1 ∩ R.
uses
Finset.mem_biUnion.mpr,Finset.mem_inter.mp,Finset.mem_inter.mpr,Finset.mem_union_left,Finset.mem_univ,Finset.mem_union_righthave hQsubE : ∀ i ∈ T, Q i ⊆ E := by intro i hi v hv rw [←hQcover] exact Finset.mem_biUnion.mpr ⟨i,hi,hv⟩ have hPsub : ∀ i ∈ (Finset.univ : Finset (Fin 4)), P i ⊆ B 1 ∩ R := by intro i _ v hv obtain ⟨hvF,hvB⟩ := Finset.mem_inter.mp hv refine Finset.mem_inter.mpr ⟨hvB,Finset.mem_union_left _ ?_⟩ exact Finset.mem_biUnion.mpr ⟨i,Finset.mem_univ _,hvF⟩ have hQsub : ∀ i ∈ T, Q i ⊆ B 1 ∩ R := by intro i hi v hv have hvE := hQsubE i hi hv exact Finset.mem_inter.mpr ⟨hEB hvE,Finset.mem_union_right _ hvE⟩
Every odd group Q j for j ∈ T is nonempty.
By hypothesis, each |Q j| is odd, so |Q j| = 2n + 1 for some integer n. Hence |Q j| ≥ 1 > 0, which implies that Q j is nonempty.
uses
Finset.card_pos.mphave hQne : ∀ i ∈ T, (Q i).Nonempty := by intro i hi apply Finset.card_pos.mp have hh := hQodd i hi obtain ⟨n,hn⟩ := hh omega
The restricted shores P i are pairwise disjoint, and each P i is disjoint from every odd group Q j.
Pairwise disjointness of the original shores F i implies pairwise disjointness of their restrictions P i = F i ∩ B 1. Similarly, because P i ⊆ F i and Q j ⊆ E, the assumed disjointness of F i and E implies that P i and Q j are disjoint.
uses
Finset.disjoint_of_subset_left,Finset.inter_subset_left,Finset.disjoint_of_subset_righthave hPdis : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ (Finset.univ : Finset (Fin 4)), i ≠ j → Disjoint (P i) (P j) := by intro i _ j _ hij exact Finset.disjoint_of_subset_left Finset.inter_subset_left (Finset.disjoint_of_subset_right Finset.inter_subset_left (hFdis i j hij)) have hPQdis : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ T, Disjoint (P i) (Q j) := by intro i _ j hj exact Finset.disjoint_of_subset_left Finset.inter_subset_left (Finset.disjoint_of_subset_right (hQsubE j hj) (hEdis i))
There are no edges in G between distinct restricted shores P i and P j (i ≠ j), nor between any restricted shore P i and any odd group Q j.
Because the blocks B 0, B 1, B 2 are mutually disjoint, x ∈ B 0 and y ∈ B 2 cannot belong to B 1. By assumption, any cross-edge between distinct shores F i and F j must connect x and y; since both endpoints of a potential edge between P i and P j must lie in B 1, no such edge can exist. Furthermore, the assumption that no edge connects any shore F i to E ensures there are no edges between P i ⊆ F i and Q j ⊆ E.
uses
Finset.disjoint_left.mp,Finset.mem_inter.mphave hxB : x ∉ B 1 := fun h => Finset.disjoint_left.mp (hBdis 0 1 (by decide)) hx h have hyB : y ∉ B 1 := fun h => Finset.disjoint_left.mp (hBdis 2 1 (by decide)) hy h have hPanti : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ (Finset.univ : Finset (Fin 4)), i ≠ j → ∀ a ∈ P i, ∀ b ∈ P j, ¬ G.Adj a b := by intro i _ j _ hij a ha b hb hadj rcases hcross i j hij a (Finset.mem_inter.mp ha).1 b (Finset.mem_inter.mp hb).1 hadj with h | h · exact hxB (h.2.2.1 ▸ (Finset.mem_inter.mp ha).2) · exact hyB (h.2.2.1 ▸ (Finset.mem_inter.mp ha).2) have hPQanti : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ T, ∀ a ∈ P i, ∀ b ∈ Q j, ¬ G.Adj a b := by intro i _ j hj a ha b hb exact hEanti i a (Finset.mem_inter.mp ha).1 b (hQsubE j hj hb)
The restricted shores and odd groups together cover B 1 ∩ R: (⋃ i, P i) ∪ (⋃ j ∈ T, Q j) = B 1 ∩ R.
Both families are contained in B 1 ∩ R by earlier steps. Conversely, every vertex v ∈ B 1 ∩ R belongs to B 1 and to (⋃ i, F i) ∪ E. If v belongs to some F i, then v ∈ F i ∩ B 1 = P i; if v ∈ E, then v belongs to some Q j since T covers E. Thus every vertex in B 1 ∩ R is covered.
uses
Finset.mem_union.mp,Finset.mem_biUnion.mp,Finset.mem_inter.mpr,Finset.mem_union_right,Finset.mem_inter.mp,Finset.mem_union_left,Finset.mem_biUnion.mprhave hcover : (Finset.univ : Finset (Fin 4)).biUnion P ∪ T.biUnion Q = B 1 ∩ R := by ext v constructor · intro hv rcases Finset.mem_union.mp hv with hvP | hvQ · obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hvP exact hPsub i hi hvi · rw [hQcover] at hvQ exact Finset.mem_inter.mpr ⟨hEB hvQ,Finset.mem_union_right _ hvQ⟩ · intro hv obtain ⟨hvB,hvR⟩ := Finset.mem_inter.mp hv rcases Finset.mem_union.mp hvR with hvF | hvE · obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hvF exact Finset.mem_union_left _ (Finset.mem_biUnion.mpr ⟨i,hi,Finset.mem_inter.mpr ⟨hvi,hvB⟩⟩) · apply Finset.mem_union_right rw [hQcover] exact hvE
The aggregate total count tot = (∑ i, |F i ∩ B 1|) + |E| equals |B 1 ∩ R|.
The lemma op1957_four_shore_aggregate_totals proves that for any block b, the aggregate count equals |(⋃ i, F i ∪ E) ∩ B b|. Specialising this identity to block b = 1 gives tot = |B 1 ∩ R|.
uses
op1957_four_shore_aggregate_totals,Finset.inter_commhave htots := op1957_four_shore_aggregate_totals F B E hFdis hEdis hBdis hBcover hEB have htot : (∑ i : Fin 4, (F i ∩ B 1).card) + E.card = (B 1 ∩ R).card := by have hh := htots.1 (1 : Fin 4) simpa [R,Finset.inter_comm] using hh
The number of nonempty restricted shores P i equals the indicator sum ∑ i, if 1 ≤ |F i ∩ B 1| then 1 else 0.
The size of the filtered index set {i | (P i).Nonempty} is expressed as an indicator sum over Fin 4. A finite set P i = F i ∩ B 1 is nonempty if and only if its cardinality is at least 1, so the condition in the indicator is equivalent to nonemptiness.
uses
Finset.card_filter,Finset.sum_congr,Finset.one_le_card,if_pos,if_neghave hg : ((Finset.univ : Finset (Fin 4)).filter (fun i => (P i).Nonempty)).card = ∑ i : Fin 4, if 1 ≤ (F i ∩ B 1).card then 1 else 0 := by rw [Finset.card_filter] apply Finset.sum_congr rfl intro i _ have he : (P i).Nonempty ↔ 1 ≤ (F i ∩ B 1).card := by simpa only [P] using (Finset.one_le_card : 1 ≤ (F i ∩ B 1).card ↔ (F i ∩ B 1).Nonempty).symm by_cases h : (P i).Nonempty · rw [if_pos h,if_pos (he.mp h)] · rw [if_neg h,if_neg (fun hh => h (he.mpr hh))]
The outside-vertex and full-block aggregate inequalities hold on B 1.
We invoke the two-family counting theorem op1957_factorcritical_block_two_family_count on the connected 1-factor-critical induced subgraph on B 1, using the families P and Q covering B 1 ∩ R with no inter-part edges. Rewriting the nonempty shore count using hg and the aggregate count tot using htot matches the conclusion of the lemma with the theorem's goal.
uses
op1957_factorcritical_block_two_family_counthave hh := op1957_factorcritical_block_two_family_count G (B 1) R hcrit hconn Finset.univ T P Q hPsub hQsub hQne hQodd hPdis hQdis hPQdis hPanti hQanti hPQanti hcover rw [hg] at hh rw [htot] exact hh
if_pos- if a property holds, the if-then-else expression evaluates to the 'then' branch
if_neg- if a property fails to hold, the if-then-else expression evaluates to the 'else' branch
Finset.one_le_card- a finite set has cardinality at least 1 if and only if it is nonempty
Finset.card_filter- the cardinality of a filtered subset {x ∈ s | p x} equals the sum of indicator values ∑ x ∈ s, if p x then 1 else 0
Finset.sum_congr- two finite sums over equal index sets are equal if their summands agree at every element
Finset.inter_comm- intersection of finite sets is commutative: s₁ ∩ s₂ = s₂ ∩ s₁
op1957_factorcritical_block_two_family_count- in a connected 1-factor-critical induced block B, two disjoint, mutually non-adjacent families covering B ∩ R satisfy the outside-vertex inequality when |B ∩ R| < |B| and the full-block component bounds when |B ∩ R| = |B|
op1957_four_shore_aggregate_totals- for a 4-block partition B and 4 shores F, the block aggregate counts ∑ i, |F i ∩ B b| + (if b = 1 then |E| else 0) equal |(⋃ i, F i ∪ E) ∩ B b| and sum to the total cardinality of ⋃ i, F i ∪ E
Finset.mem_union.mp- if an element belongs to a union of sets s ∪ t, then it belongs to s or it belongs to t
Finset.mem_biUnion.mp- if an element belongs to an indexed union ⋃ a ∈ s, t a, then it belongs to t a for some a ∈ s
Finset.disjoint_left.mp- if two sets are disjoint and an element belongs to the first, then it does not belong to the second
Finset.disjoint_of_subset_left- if s is a subset of u and u is disjoint from t, then s is disjoint from t
Finset.disjoint_of_subset_right- if t is a subset of u and s is disjoint from u, then s is disjoint from t
Finset.inter_subset_left- the intersection s₁ ∩ s₂ is a subset of s₁
Finset.card_pos.mp- if a finite set has strictly positive cardinality, then it is nonempty
Finset.mem_biUnion.mpr- if an element belongs to t a for some index a ∈ s, then it belongs to the indexed union ⋃ a ∈ s, t a
Finset.mem_inter.mp- if an element belongs to an intersection s ∩ t, then it belongs to both s and t
Finset.mem_inter.mpr- if an element belongs to s and to t, then it belongs to the intersection s ∩ t
Finset.mem_union_left- if an element belongs to s, then it belongs to the union s ∪ t
Finset.mem_union_right- if an element belongs to t, then it belongs to the union s ∪ t
Finset.mem_univ- every element of a finite type belongs to its universal set Finset.univ
- The positivity of the odd cardinality |Q j| = 2n + 1 > 0 is discharged by the linear arithmetic decision procedure omega on line 49.
- The inequality of concrete block indices (0 ≠ 1 and 2 ≠ 1) is verified by computation with decide on lines 59 and 60.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option maxHeartbeats 2000000theorem four_shore_aggregate_block_criticality {V J : Type*} [Fintype V] [DecidableEq V] [DecidableEq J] (G : SimpleGraph V) [DecidableRel G.Adj] (F B : Fin 4 → Finset V) (E : Finset V) (x y : V) (T : Finset J) (Q : J → Finset V) (hFdis : ∀ i j : Fin 4, i ≠ j → Disjoint (F i) (F j)) (hEdis : ∀ i : Fin 4, Disjoint (F i) E) (hBdis : ∀ i j : Fin 4, i ≠ j → Disjoint (B i) (B j)) (hBcover : (Finset.univ : Finset (Fin 4)).biUnion B = Finset.univ) (hEB : E ⊆ B 1) (hx : x ∈ B 0) (hy : y ∈ B 2) (hcross : ∀ i l : Fin 4, i ≠ l → ∀ a ∈ F i, ∀ b ∈ F l, G.Adj a b → (i=0 ∧ l=1 ∧ a=x ∧ b=y) ∨ (i=1 ∧ l=0 ∧ a=y ∧ b=x)) (hEanti : ∀ i : Fin 4, ∀ a ∈ F i, ∀ w ∈ E, ¬ G.Adj a w) (hQodd : ∀ j ∈ T, Odd (Q j).card) (hQdis : ∀ i ∈ T, ∀ j ∈ T, i ≠ j → Disjoint (Q i) (Q j)) (hQanti : ∀ i ∈ T, ∀ j ∈ T, i ≠ j → ∀ a ∈ Q i, ∀ b ∈ Q j, ¬ G.Adj a b) (hQcover : T.biUnion Q = E) (hcrit : is_k_factor_critical (G.induce {v | v ∈ B 1}) 1) (hconn : (G.induce {v | v ∈ B 1}).Connected) : let g : Fin 4 → Fin 4 → ℕ := fun i b => (F i ∩ B b).card let tot := (∑ i : Fin 4, g i 1) + E.card (tot < (B 1).card → T.card + tot + 1 ≤ (B 1).card) ∧ (tot = (B 1).card → T.card ≤ 1 ∧ (∑ i : Fin 4, if 1 ≤ g i 1 then 1 else 0) + T.card ≤ 1) := by classical dsimp only let R := (Finset.univ : Finset (Fin 4)).biUnion F ∪ E let P : Fin 4 → Finset V := fun i => F i ∩ B 1 have hQsubE : ∀ i ∈ T, Q i ⊆ E := by intro i hi v hv rw [←hQcover] exact Finset.mem_biUnion.mpr ⟨i,hi,hv⟩ have hPsub : ∀ i ∈ (Finset.univ : Finset (Fin 4)), P i ⊆ B 1 ∩ R := by intro i _ v hv obtain ⟨hvF,hvB⟩ := Finset.mem_inter.mp hv refine Finset.mem_inter.mpr ⟨hvB,Finset.mem_union_left _ ?_⟩ exact Finset.mem_biUnion.mpr ⟨i,Finset.mem_univ _,hvF⟩ have hQsub : ∀ i ∈ T, Q i ⊆ B 1 ∩ R := by intro i hi v hv have hvE := hQsubE i hi hv exact Finset.mem_inter.mpr ⟨hEB hvE,Finset.mem_union_right _ hvE⟩ have hQne : ∀ i ∈ T, (Q i).Nonempty := by intro i hi apply Finset.card_pos.mp have hh := hQodd i hi obtain ⟨n,hn⟩ := hh omega have hPdis : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ (Finset.univ : Finset (Fin 4)), i ≠ j → Disjoint (P i) (P j) := by intro i _ j _ hij exact Finset.disjoint_of_subset_left Finset.inter_subset_left (Finset.disjoint_of_subset_right Finset.inter_subset_left (hFdis i j hij)) have hPQdis : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ T, Disjoint (P i) (Q j) := by intro i _ j hj exact Finset.disjoint_of_subset_left Finset.inter_subset_left (Finset.disjoint_of_subset_right (hQsubE j hj) (hEdis i)) have hxB : x ∉ B 1 := fun h => Finset.disjoint_left.mp (hBdis 0 1 (by decide)) hx h have hyB : y ∉ B 1 := fun h => Finset.disjoint_left.mp (hBdis 2 1 (by decide)) hy h have hPanti : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ (Finset.univ : Finset (Fin 4)), i ≠ j → ∀ a ∈ P i, ∀ b ∈ P j, ¬ G.Adj a b := by intro i _ j _ hij a ha b hb hadj rcases hcross i j hij a (Finset.mem_inter.mp ha).1 b (Finset.mem_inter.mp hb).1 hadj with h | h · exact hxB (h.2.2.1 ▸ (Finset.mem_inter.mp ha).2) · exact hyB (h.2.2.1 ▸ (Finset.mem_inter.mp ha).2) have hPQanti : ∀ i ∈ (Finset.univ : Finset (Fin 4)), ∀ j ∈ T, ∀ a ∈ P i, ∀ b ∈ Q j, ¬ G.Adj a b := by intro i _ j hj a ha b hb exact hEanti i a (Finset.mem_inter.mp ha).1 b (hQsubE j hj hb) have hcover : (Finset.univ : Finset (Fin 4)).biUnion P ∪ T.biUnion Q = B 1 ∩ R := by ext v constructor · intro hv rcases Finset.mem_union.mp hv with hvP | hvQ · obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hvP exact hPsub i hi hvi · rw [hQcover] at hvQ exact Finset.mem_inter.mpr ⟨hEB hvQ,Finset.mem_union_right _ hvQ⟩ · intro hv obtain ⟨hvB,hvR⟩ := Finset.mem_inter.mp hv rcases Finset.mem_union.mp hvR with hvF | hvE · obtain ⟨i,hi,hvi⟩ := Finset.mem_biUnion.mp hvF exact Finset.mem_union_left _ (Finset.mem_biUnion.mpr ⟨i,hi,Finset.mem_inter.mpr ⟨hvi,hvB⟩⟩) · apply Finset.mem_union_right rw [hQcover] exact hvE have htots := op1957_four_shore_aggregate_totals F B E hFdis hEdis hBdis hBcover hEB have htot : (∑ i : Fin 4, (F i ∩ B 1).card) + E.card = (B 1 ∩ R).card := by have hh := htots.1 (1 : Fin 4) simpa [R,Finset.inter_comm] using hh have hg : ((Finset.univ : Finset (Fin 4)).filter (fun i => (P i).Nonempty)).card = ∑ i : Fin 4, if 1 ≤ (F i ∩ B 1).card then 1 else 0 := by rw [Finset.card_filter] apply Finset.sum_congr rfl intro i _ have he : (P i).Nonempty ↔ 1 ≤ (F i ∩ B 1).card := by simpa only [P] using (Finset.one_le_card : 1 ≤ (F i ∩ B 1).card ↔ (F i ∩ B 1).Nonempty).symm by_cases h : (P i).Nonempty · rw [if_pos h,if_pos (he.mp h)] · rw [if_neg h,if_neg (fun hh => h (he.mpr hh))] have hh := op1957_factorcritical_block_two_family_count G (B 1) R hcrit hconn Finset.univ T P Q hPsub hQsub hQne hQodd hPdis hQdis hPQdis hPanti hQanti hPQanti hcover rw [hg] at hh rw [htot] exact hh