File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Mathlib/Combinatorics/Additive Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,22 @@ lemma mul_inv_eq_inv_mul_of_doubling_lt_two (h : #(A * A) < 2 * #A) : A * A⁻¹
141141 simpa using
142142 mul_inv_eq_inv_mul_of_doubling_lt_two_aux (A := A⁻¹) (by simpa [← mul_inv_rev] using h)
143143
144+ -- theorem Nat.cast_rat_nonneg (n : Nat) : 0 ≤ (n : Rat) := Nat.cast_nonneg n
145+
146+ -- grind_pattern Nat.cast_rat_nonneg => (n : Rat)
147+
148+ grind_pattern Nat.cast_nonneg' => (n : α)
149+
150+ open Lean.Grind in
151+ attribute [local instance] Semiring.natCast in
152+ theorem Nat.cast_nonneg'' {α : Type _} [Lean.Grind.Semiring α] (n : Nat) : 0 ≤ (n : α) := sorry
153+
154+ example (p q : Nat) (h : (p : Rat) < 3 / 2 * q) : (p : Rat) < 2 * q := by grind
155+
144156private lemma weaken_doubling (h : #(A * A) < (3 / 2 : ℚ) * #A) : #(A * A) < 2 * #A := by
145157 rw [← Nat.cast_lt (α := ℚ), Nat.cast_mul, Nat.cast_two]
146- linarith only [h]
147-
158+ grind
159+ #exit
148160private lemma nonempty_of_doubling (h : #(A * A) < (3 / 2 : ℚ) * #A) : A.Nonempty := by
149161 by_contra! rfl
150162 simp at h
You can’t perform that action at this time.
0 commit comments