This PR upstreams lemmas about `Rat` from `Mathlib.Data.Rat.Defs` and `Mathlib.Algebra.Order.Ring.Unbundled.Rat`, specifically enough to get `Lean.Grind.Field Rat` and `Lean.Grind.OrderedRing Rat`. In addition to the lemmas, instances for `Inv Rat`, `Pow Rat Nat` and `Pow Rat Int` have been upstreamed. --------- Co-authored-by: Kim Morrison <kim@tqft.net>
20 lines
379 B
Text
20 lines
379 B
Text
|
|
/-!
|
|
Test the `rightact%` elaborator for `HPow.hPow`, added to address #2854
|
|
-/
|
|
|
|
open Lean
|
|
|
|
variable (n : Nat) (m : Int) (q : Rat)
|
|
|
|
#check n ^ 2 + m ^ 2
|
|
#check n ^ 2 + 1
|
|
#check (n ^ 2 + 1 : Int)
|
|
#check (n ^ 2 + (1 : Nat) : Int)
|
|
|
|
#check q ^ n + 1
|
|
#check q ^ m + 1
|
|
#check q ^ (n : Int) + 1
|
|
|
|
#check 12 * q + 1 ≤ 13 * q ^ 2
|
|
#check (12 : Rat) * q + (1 : Rat) ≤ (13 : Rat) * q ^ 2
|