We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Rat.max_def
1 parent 3768c07 commit 3824061Copy full SHA for 3824061
src/Init/Data/Rat/Lemmas.lean
@@ -1023,6 +1023,19 @@ theorem ofScientific_def' :
1023
· push_cast
1024
rfl
1025
1026
+/-!
1027
+# min and max
1028
+-/
1029
+
1030
+@[grind =] protected theorem max_def {n m : Rat} : max n m = if n ≤ m then m else n := rfl
1031
1032
+@[grind =] protected theorem min_def {n m : Rat} : min n m = if n ≤ m then n else m := rfl
1033
1034
1035
1036
+# floor
1037
1038
1039
theorem floor_def (a : Rat) : a.floor = a.num / a.den := by
1040
rw [Rat.floor]
1041
split <;> simp_all
tests/lean/run/grind_rat.lean
@@ -0,0 +1 @@
1
+example : (1 : Rat) + max 2 3 = 4 := by grind
0 commit comments