Theorem: LRAT.DefaultFormula.existsRatHint_of_ratHintsExhaustive (LeanSAT/LRAT/Formula/RatAddSound.lean)

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
c'_in_f : c' ∈ f.toList
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
simp only [toList, Array.toList_eq, f_readyForRatAdd.2.1, Array.data_toArray, List.map, List.append_nil, f_readyForRatAdd.1,
  List.mem_filterMap, id_eq, exists_eq_right] at c'_in_f
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
c'_in_f : some c' ∈ f.clauses.data
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
c'_in_f : some c' ∈ f.clauses.data
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
rw [List.mem_iff_get] at c'_in_f
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
c'_in_f : ∃ n_1, f.clauses.data.get n_1 = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
c'_in_f : ∃ n_1, f.clauses.data.get n_1 = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
rcases c'_in_f with ⟨i, c'_in_f⟩
State after:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses.data.get i = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses.data.get i = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
rw [← Array.getElem_eq_data_get] at c'_in_f
State after:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true : f.ratHintsExhaustive pivot ratHints = true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
simp only [ratHintsExhaustive, getRatClauseIndices] at ratHintsExhaustive_eq_true
State after:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
have i_in_bounds : i.val < Array.size (Array.range (Array.size f.clauses)) := by
  rw [Array.range_size]
  dsimp
  omega
State after:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
have i_lt_f_clauses_size : i.1 < f.clauses.size := by
  rw [Array.range_size] at i_in_bounds
  exact i_in_bounds
State after:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
have h : i.1 ∈ (ratHints.map (fun x => x.1)).data := by
  rw [← of_decide_eq_true ratHintsExhaustive_eq_true]
  have i_eq_range_i : i.1 = (Array.range f.clauses.size)[i.1]'i_in_bounds := by
    have f_clauses_rw : f.clauses = { data := f.clauses.data } := rfl
    rw [Array.range_idx]
    conv => rhs; rw [f_clauses_rw, Array.size]
    exact i.2
  rw [i_eq_range_i]
  apply Misc.Array.mem_filter i.1 i_in_bounds
  simp only [getElem!, Array.range_idx i_lt_f_clauses_size, i_lt_f_clauses_size, dite_true,
    c'_in_f, DefaultClause.contains_iff, Array.get_eq_getElem]
  simp only [Clause.toList] at negPivot_in_c'
  exact negPivot_in_c'
State after:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
rcases List.get_of_mem h with ⟨j, h'⟩
State after:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
have j_in_bounds : j < ratHints.size := by
  have j_property := j.2
  simp only [Array.map_data, List.length_map] at j_property
  dsimp at *
  omega
State after:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_in_bounds : ↑j < ratHints.size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_in_bounds : ↑j < ratHints.size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
rw [← Array.getElem_eq_data_get] at h'
State after:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints)[↑j] = ↑i
j_in_bounds : ↑j < ratHints.size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints)[↑j] = ↑i
j_in_bounds : ↑j < ratHints.size
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
simp only [Array.getElem_map] at h'
State after:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
j_in_bounds : ↑j < ratHints.size
h' : ratHints[↑j].fst = ↑i
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'

State before:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
j_in_bounds : ↑j < ratHints.size
h' : ratHints[↑j].fst = ↑i
⊢ ∃ i, f.clauses[ratHints[i].fst]! = some c'
Tactic:
apply Exists.intro ⟨j.1, j_in_bounds⟩
State after:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
j_in_bounds : ↑j < ratHints.size
h' : ratHints[↑j].fst = ↑i
⊢ f.clauses[ratHints[⟨↑j, j_in_bounds⟩].fst]! = some c'

State before:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
j_in_bounds : ↑j < ratHints.size
h' : ratHints[↑j].fst = ↑i
⊢ f.clauses[ratHints[⟨↑j, j_in_bounds⟩].fst]! = some c'
Tactic:
simp only [getElem!, Fin.getElem_fin, h', i_lt_f_clauses_size, dite_true]
State after:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
j_in_bounds : ↑j < ratHints.size
h' : ratHints[↑j].fst = ↑i
⊢ f.clauses.get ⟨↑i, ⋯⟩ = some c'

State before:
case intro.intro
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
j_in_bounds : ↑j < ratHints.size
h' : ratHints[↑j].fst = ↑i
⊢ f.clauses.get ⟨↑i, ⋯⟩ = some c'
Tactic:
exact c'_in_f
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
⊢ ↑i < (Array.range f.clauses.size).size
Tactic:
rw [Array.range_size]
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
⊢ ↑i < f.clauses.size

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
⊢ ↑i < f.clauses.size
Tactic:
omega
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
⊢ ↑i < f.clauses.size
Tactic:
rw [Array.range_size] at i_in_bounds
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < f.clauses.size
⊢ ↑i < f.clauses.size

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < f.clauses.size
⊢ ↑i < f.clauses.size
Tactic:
exact i_in_bounds
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
⊢ ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
Tactic:
rw [← of_decide_eq_true ratHintsExhaustive_eq_true]
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
⊢ ↑i ∈
    (Array.filter
        (fun i =>
          match f.clauses[i]! with
          | none => false
          | some c => c.contains pivot.negateLiteral)
        (Array.range f.clauses.size) 0).data

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
⊢ ↑i ∈
    (Array.filter
        (fun i =>
          match f.clauses[i]! with
          | none => false
          | some c => c.contains pivot.negateLiteral)
        (Array.range f.clauses.size) 0).data
Tactic:
have i_eq_range_i : i.1 = (Array.range f.clauses.size)[i.1]'i_in_bounds := by
  have f_clauses_rw : f.clauses = { data := f.clauses.data } := rfl
  rw [Array.range_idx]
  conv => rhs; rw [f_clauses_rw, Array.size]
  exact i.2
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ ↑i ∈
    (Array.filter
        (fun i =>
          match f.clauses[i]! with
          | none => false
          | some c => c.contains pivot.negateLiteral)
        (Array.range f.clauses.size) 0).data

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ ↑i ∈
    (Array.filter
        (fun i =>
          match f.clauses[i]! with
          | none => false
          | some c => c.contains pivot.negateLiteral)
        (Array.range f.clauses.size) 0).data
Tactic:
rw [i_eq_range_i]
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ (Array.range f.clauses.size)[↑i] ∈
    (Array.filter
        (fun i =>
          match f.clauses[i]! with
          | none => false
          | some c => c.contains pivot.negateLiteral)
        (Array.range f.clauses.size) 0).data

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ (Array.range f.clauses.size)[↑i] ∈
    (Array.filter
        (fun i =>
          match f.clauses[i]! with
          | none => false
          | some c => c.contains pivot.negateLiteral)
        (Array.range f.clauses.size) 0).data
Tactic:
apply Misc.Array.mem_filter i.1 i_in_bounds
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ (match f.clauses[(Array.range f.clauses.size)[↑i]]! with
    | none => false
    | some c => c.contains pivot.negateLiteral) =
    true

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ (match f.clauses[(Array.range f.clauses.size)[↑i]]! with
    | none => false
    | some c => c.contains pivot.negateLiteral) =
    true
Tactic:
simp only [getElem!, Array.range_idx i_lt_f_clauses_size, i_lt_f_clauses_size, dite_true,
  c'_in_f, DefaultClause.contains_iff, Array.get_eq_getElem]
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ pivot.negateLiteral ∈ c'.toList

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ pivot.negateLiteral ∈ c'.toList
Tactic:
simp only [Clause.toList] at negPivot_in_c'
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ c'.toList
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ pivot.negateLiteral ∈ c'.toList

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ c'.toList
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
i_eq_range_i : ↑i = (Array.range f.clauses.size)[↑i]
⊢ pivot.negateLiteral ∈ c'.toList
Tactic:
exact negPivot_in_c'
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
⊢ ↑i = (Array.range f.clauses.size)[↑i]
Tactic:
have f_clauses_rw : f.clauses = { data := f.clauses.data } := rfl
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑i = (Array.range f.clauses.size)[↑i]

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑i = (Array.range f.clauses.size)[↑i]
Tactic:
rw [Array.range_idx]
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑i < f.clauses.size

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑i < f.clauses.size
Tactic:
conv => rhs; rw [f_clauses_rw, Array.size]
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑i < { data := f.clauses.data }.data.length

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑i < { data := f.clauses.data }.data.length
Tactic:
exact i.2
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
⊢ ↑j < ratHints.size
Tactic:
have j_property := j.2
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_property : ↑j < (Array.map (fun x => x.fst) ratHints).data.length
⊢ ↑j < ratHints.size

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_property : ↑j < (Array.map (fun x => x.fst) ratHints).data.length
⊢ ↑j < ratHints.size
Tactic:
simp only [Array.map_data, List.length_map] at j_property
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_property : ↑j < ratHints.data.length
⊢ ↑j < ratHints.size

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_property : ↑j < ratHints.data.length
⊢ ↑j < ratHints.size
Tactic:
dsimp at *
State after:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_property : ↑j < ratHints.size
⊢ ↑j < ratHints.size

State before:
n : Nat
f : DefaultFormula n
f_readyForRatAdd : f.readyForRatAdd
pivot : Literal (PosFin n)
ratHints : Array (Nat × Array Nat)
ratHintsExhaustive_eq_true :
  decide
      (Array.filter
          (fun i =>
            match f.clauses[i]! with
            | none => false
            | some c => c.contains pivot.negateLiteral)
          (Array.range f.clauses.size) 0 =
        Array.map (fun x => x.fst) ratHints) =
    true
c' : DefaultClause n
negPivot_in_c' : pivot.negateLiteral ∈ Clause.toList c'
i : Fin f.clauses.data.length
c'_in_f : f.clauses[↑i] = some c'
i_in_bounds : ↑i < (Array.range f.clauses.size).size
i_lt_f_clauses_size : ↑i < f.clauses.size
h : ↑i ∈ (Array.map (fun x => x.fst) ratHints).data
j : Fin (Array.map (fun x => x.fst) ratHints).data.length
h' : (Array.map (fun x => x.fst) ratHints).data.get j = ↑i
j_property : ↑j < ratHints.size
⊢ ↑j < ratHints.size
Tactic:
omega
State after:
no goals