Zulip Chat Archive
Stream: new members
Topic: Values of n (mod 3)
Harry Pacitti (Apr 03 2022 at 12:11):
I'm working on the proof below but am stuck on the lines including sorry. Any help would be appreciated.
import algebra.field.basic
import number_theory.pythagorean_triples
import ring_theory.int.basic
import algebra.group_with_zero.power
import tactic.ring
import tactic.ring_exp
import tactic.field_simp
import data.zmod.basic
lemma mod_three_eq_zero_or_one_or_two (n : ℤ) : n % 3 = 0 ∨ n % 3 = 1 ∨ n % 3 = 2 :=
have h : n % 3 < 3 := abs_of_nonneg (show 0 ≤ (2 : ℤ), from dec_trivial) ▸ int.mod_lt _ dec_trivial,
have h₁ : 0 ≤ n % 3 := int.mod_nonneg _ dec_trivial,
match (n % 3), h, h₁ with
| (0:ℕ) := λ _ _, or.inl rfl
| (1 : ℕ) := λ _ _, sorry
| (2 : ℕ) := λ _ _, sorry
| (k + 3 : ℕ) := λ h _, absurd h dec_trivial
| -[1+ a] := λ _ h₁, absurd h₁ dec_trivial
end
Marcus Rossel (Apr 03 2022 at 12:16):
Do or.inr (or.inl rfl)
and or.inr (or.inr rfl)
work?
Last updated: Dec 20 2023 at 11:08 UTC