Skip to content

Commit d3b1fce

Browse files
committed
cast_nonneg
1 parent 847c38a commit d3b1fce

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Mathlib/Combinatorics/Additive/VerySmallDoubling.lean

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,20 @@ lemma mul_inv_eq_inv_mul_of_doubling_lt_two (h : #(A * A) < 2 * #A) : A * A⁻¹
145145

146146
-- grind_pattern Nat.cast_rat_nonneg => (n : Rat)
147147

148-
grind_pattern Nat.cast_nonneg' => (n : α)
148+
-- grind_pattern Nat.cast_nonneg' => (n : α)
149149

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
150+
section
151+
open Std Lean.Grind
152+
attribute [local instance] Semiring.natCast
153+
154+
theorem Nat.cast_nonneg''
155+
{α : Type _} [Lean.Grind.Semiring α] [LE α] [LT α] [IsPreorder α] [OrderedRing α]
156+
(n : Nat) : 0 ≤ (n : α) :=
157+
sorry
158+
159+
grind_pattern Nat.cast_nonneg'' => (n : α)
160+
161+
end
153162

154163
example (p q : Nat) (h : (p : Rat) < 3 / 2 * q) : (p : Rat) < 2 * q := by grind
155164

0 commit comments

Comments
 (0)