Theorem: a₁ (Fl.lean)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₁ : correct₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
cases Nat.le_total a b with
| inl hab =>
  rewrite [Nat.add_comm]
  exact a₁' npos hfaithful₀ hfaithful₁ hcorrect₁ hfb hfa hab
| inr hba => exact a₁' npos hfaithful₀ hfaithful₁ hcorrect₁ hfa hfb hba
State after:
no goals

State before:
case inl
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₁ : correct₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hab : a ≤ b
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
rewrite [Nat.add_comm]
State after:
case inl
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₁ : correct₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hab : a ≤ b
⊢ trunc n (b + a - round (b + a)) = b + a - round (b + a) ∧ trunc n (round (b + a) - (b + a)) = round (b + a) - (b + a)

State before:
case inl
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₁ : correct₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hab : a ≤ b
⊢ trunc n (b + a - round (b + a)) = b + a - round (b + a) ∧ trunc n (round (b + a) - (b + a)) = round (b + a) - (b + a)
Tactic:
exact a₁' npos hfaithful₀ hfaithful₁ hcorrect₁ hfb hfa hab
State after:
no goals

State before:
case inr
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₁ : correct₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
exact a₁' npos hfaithful₀ hfaithful₁ hcorrect₁ hfa hfb hba
State after:
no goals