internlm/Lean-Github huggingface dataset:
Theorem: algebra.grlex_add_le_add
Proof state before:
case inl.inr
n : ℕ
a b c : Variables n order.GrLex
h✝¹ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝ : ¬Order.lex a b
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
⊢ if sum₁ < sum₂ then True else if sum₁ = sum₂ then True else False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
repeat (split; simp)
Proof state after:
case inl.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝³ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝² : ¬Order.lex a b
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : ¬sum₁ = sum₂
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inl.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝³ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝² : ¬Order.lex a b
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : ¬sum₁ = sum₂
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
simp [elem_sum_is_hom] at *
Proof state after:
case inl.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝³ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝² : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h_le : if Order.grlex.elem_sum a < Order.grlex.elem_sum b then True else False
h✝¹ : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inl.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝³ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝² : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h_le : if Order.grlex.elem_sum a < Order.grlex.elem_sum b then True else False
h✝¹ : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
split at h_le
Proof state after:
case inl.inr.inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : True
⊢ False

case inl.inr.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : ¬Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : False
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inl.inr.inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : True
⊢ False

case inl.inr.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : ¬Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : False
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
rename_i h₁ h₂ h₃
Proof state after:
case inl.inr.inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h✝¹ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h₁ : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h₂ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h₃ : Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : True
⊢ False

case inl.inr.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : ¬Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : False
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inl.inr.inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h✝¹ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h₁ : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h₂ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h₃ : Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : True
⊢ False

case inl.inr.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : ¬Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : False
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
exact Nat.le_lt_antisymm h₁ h₃
Proof state after:
case inl.inr.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : ¬Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : False
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inl.inr.inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h✝⁴ : Order.lex (Variables.mul a c) (Variables.mul b c)
h✝³ : ¬Order.lex a b
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : ¬Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : ¬Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : False
⊢ False

case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
exact h_le
Proof state after:
case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
⊢ let sum₁ := Order.grlex.elem_sum (Variables.mul a c);
  let sum₂ := Order.grlex.elem_sum (Variables.mul b c);
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
intros sum₁ sum₂
Proof state after:
case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
⊢ if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
⊢ if sum₁ < sum₂ then True else if sum₁ = sum₂ then False else False
Tactic:
split
Proof state after:
case inr.inl
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝¹ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝ : sum₁ < sum₂
⊢ True

case inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝¹ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝ : ¬sum₁ < sum₂
⊢ if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inr.inl
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝¹ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝ : sum₁ < sum₂
⊢ True

case inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝¹ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝ : ¬sum₁ < sum₂
⊢ if sum₁ = sum₂ then False else False
Tactic:
simp
Proof state after:
case inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝¹ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝ : ¬sum₁ < sum₂
⊢ if sum₁ = sum₂ then False else False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝¹ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝ : ¬sum₁ < sum₂
⊢ if sum₁ = sum₂ then False else False
Tactic:
split
Proof state after:
case inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : sum₁ = sum₂
⊢ False

case inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : ¬sum₁ = sum₂
⊢ False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : sum₁ = sum₂
⊢ False

case inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : ¬sum₁ = sum₂
⊢ False
Tactic:
simp [elem_sum_is_hom] at *
Proof state after:
case inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h_le :
  if Order.grlex.elem_sum a < Order.grlex.elem_sum b then True
  else if Order.grlex.elem_sum a = Order.grlex.elem_sum b then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝ : Order.grlex.elem_sum a = Order.grlex.elem_sum b
⊢ False

case inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : ¬sum₁ = sum₂
⊢ False
Theorem: algebra.grlex_add_le_add
Proof state before:
case inr.inr.inl
n : ℕ
a b c : Variables n order.GrLex
h_le :
  if Order.grlex.elem_sum a < Order.grlex.elem_sum b then True
  else if Order.grlex.elem_sum a = Order.grlex.elem_sum b then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝ : Order.grlex.elem_sum a = Order.grlex.elem_sum b
⊢ False

case inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : ¬sum₁ = sum₂
⊢ False
Tactic:
split at h_le
Proof state after:
case inr.inr.inl.inl
n : ℕ
a b c : Variables n order.GrLex
h✝³ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : True
⊢ False

case inr.inr.inl.inr
n : ℕ
a b c : Variables n order.GrLex
h✝³ : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝² : Order.grlex.elem_sum b ≤ Order.grlex.elem_sum a
h✝¹ : Order.grlex.elem_sum a = Order.grlex.elem_sum b
h✝ : ¬Order.grlex.elem_sum a < Order.grlex.elem_sum b
h_le : if Order.lex a b then True else False
⊢ False

case inr.inr.inr
n : ℕ
a b c : Variables n order.GrLex
h_le :
  let sum₁ := Order.grlex.elem_sum a;
  let sum₂ := Order.grlex.elem_sum b;
  if sum₁ < sum₂ then True else if sum₁ = sum₂ then if Order.lex a b then True else False else False
h✝² : ¬Order.lex (Variables.mul a c) (Variables.mul b c)
sum₁ : ℕ := Order.grlex.elem_sum (Variables.mul a c)
sum₂ : ℕ := Order.grlex.elem_sum (Variables.mul b c)
h✝¹ : ¬sum₁ < sum₂
h✝ : ¬sum₁ = sum₂
⊢ False