awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have pos₇ : i_1 = i →
  j_1 ∈ some j →
    ¬i_1 = j_1 →
      j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have neg₃ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
neg₃ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have pos₈ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 1
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
neg₃ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
pos₈ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 1
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have pos₉ : i_1 = i →
  j_1 ∉ some j →
    i_1 = j_1 →
      j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 1 - 1 + 0 + 1
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
neg₃ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
pos₈ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 1
pos₉ :
  i_1 = i →
    j_1 ∉ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 1 - 1 + 0 + 1
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have neg₄ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 0
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
neg₃ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
pos₈ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 1
pos₉ :
  i_1 = i →
    j_1 ∉ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 1 - 1 + 0 + 1
neg₄ :
  i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 0
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have pos₁₀ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 0 - 0 + 0 + 0
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
neg₃ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
pos₈ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 1
pos₉ :
  i_1 = i →
    j_1 ∉ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 1 - 1 + 0 + 1
neg₄ :
  i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 0
pos₁₀ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 0 - 0 + 0 + 0
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have pos₁₁ : i_1 = i →
  j_1 ∉ some j →
    i_1 = j_1 →
      j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 0 - 1 + 0 + 1
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
neg₃ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
pos₈ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 1
pos₉ :
  i_1 = i →
    j_1 ∉ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 1 - 1 + 0 + 1
neg₄ :
  i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 0
pos₁₀ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 0 - 0 + 0 + 0
pos₁₁ :
  i_1 = i →
    j_1 ∉ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 0 - 1 + 0 + 1
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have neg₅ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 0 = HSub.hSub (α := α) 1 0 - 0 + 0 + 0
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
n : Type u_4
α : Type u_5
inst : DecidableEq n
inst_1 : AddGroupWithOne α
i j i_1 j_1 : n
pos : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
pos₁ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 1 - 1 + 1 + 1
neg : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 1 - 0 + 1 + 0
pos₂ : i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 0
pos₃ :
  i_1 = i →
    j_1 ∈ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 1 0 - 1 + 1 + 1
neg₁ :
  i_1 = i → j_1 ∈ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 1 0 - 0 + 1 + 0
pos₄ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
pos₅ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 1 - 1 + 1 + 1
neg₂ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 1 - 0 + 1 + 0
pos₆ : i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → i_1 = j → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 0
pos₇ :
  i_1 = i →
    j_1 ∈ some j →
      ¬i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 1 = HSub.hSub (α := α) 0 0 - 1 + 1 + 1
neg₃ :
  i_1 = i → j_1 ∈ some j → ¬i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 1 = HSub.hSub (α := α) 0 0 - 0 + 1 + 0
pos₈ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 1
pos₉ :
  i_1 = i →
    j_1 ∉ some j →
      i_1 = j_1 →
        j_1 ∈ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 1 - 1 + 0 + 1
neg₄ :
  i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∈ some i → ¬i_1 = j → j_1 ∉ none → 0 = HSub.hSub (α := α) 1 1 - 0 + 0 + 0
pos₁₀ : i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∉ some i → i_1 = j → 0 = HSub.hSub (α := α) 1 0 - 0 + 0 + 0
pos₁₁ :
  i_1 = i →
    j_1 ∉ some j →
      i_1 = j_1 →
        j_1 ∉ some i → ¬i_1 = j → Membership.mem (γ := Option n) none j_1 → 0 = HSub.hSub (α := α) 1 0 - 1 + 0 + 1
neg₅ :
  i_1 = i → j_1 ∉ some j → i_1 = j_1 → j_1 ∉ some i → ¬i_1 = j → j_1 ∉ none → 0 = HSub.hSub (α := α) 1 0 - 0 + 0 + 0
⊢ (if j_1 ∈ some (if i_1 = i then j else if i_1 = j then i else i_1) then 1 else 0) =
    ((HSub.hSub (α := α) (if i_1 = j_1 then 1 else 0) (if j_1 ∈ if i_1 = i then some i else none then 1 else 0) -
          if j_1 ∈ if i_1 = j then some j else none then 1 else 0) +
        if j_1 ∈ if i_1 = i then some j else none then 1 else 0) +
      if j_1 ∈ if i_1 = j then some i else none then 1 else 0
have pos₁₂ : i_1 = i → j_1 ∉ some j → ¬i_1 = j_1 → j_1 ∈ some i → i_1 = j → 0 = HSub.hSub (α := α) 0 1 - 0 + 0 + 1
Tactic: split_ifs
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
k : Type u_1
m : Type u_3
n : Type u_4
α : Type u_5
inst : Fintype n
inst_1 : DecidableEq k
inst_2 : DecidableEq m
inst_3 : DecidableEq n
inst_4 : NonAssocSemiring α
a : m
b : n
c : k
⊢ HMul.hMul (α := Matrix m n α) (β := Matrix n k α) (single a b).toMatrix (single b c).toMatrix = (single a c).toMatrix
have rw : Eq (α := Matrix m k α) ((single a b).trans (single b c)).toMatrix (single a c).toMatrix
Tactic: rw [← toMatrix_trans, single_trans_single]
-- Lean 4 proof step from Mathlib.Data.Matrix.PEquiv (goal)
Goal:
k : Type u_1
m : Type u_3
n : Type u_4
α : Type u_5
inst : Fintype n
inst_1 : DecidableEq k
inst_2 : DecidableEq m
inst_3 : DecidableEq n
inst_4 : NonAssocSemiring α
a : m
b : n
c : k
rw : Eq (α := Matrix m k α) ((single a b).trans (single b c)).toMatrix (single a c).toMatrix
⊢ HMul.hMul (α := Matrix m n α) (β := Matrix n k α) (single a b).toMatrix (single b c).toMatrix = (single a c).toMatrix
have rw₁ : Eq (α := Matrix m k α) (single a c).toMatrix (single a c).toMatrix
Tactic: rw [← toMatrix_trans, single_trans_single]