nat.bend fails
raw source on the hub · import bend-mathlib@0.4.0.0/nat.bend as MNat
bend-mathlib/nat.bend: Nat arithmetic (add, mul, sub, min, max, pow) and order (le, lt, ge, gt).
1 import
import Base
Laws
law add_zero unverifiedits file does not pass the checker (fails)source · line 5 · raw
@x:Nat -> {Nat.add(x, 0n) == x : Nat}Zero is a right identity for addition: x + 0 = x.
law zero_add unverifiedits file does not pass the checker (fails)source · line 18 · raw
@-x:Nat -> {Nat.add(0n, x) == x : Nat}Zero is a left identity for addition: 0 + x = x.
law add_succ unverifiedits file does not pass the checker (fails)source · line 26 · raw
@n:Nat -> @-m:Nat -> {Nat.add(n, 1n+m) == 1n+Nat.add(n, m) : Nat}Adding a successor on the right: n + (m + 1) = (n + m) + 1.
law succ_add unverifiedits file does not pass the checker (fails)source · line 40 · raw
@-n:Nat -> @-m:Nat -> {Nat.add(1n+n, m) == 1n+Nat.add(n, m) : Nat}Adding a successor on the left: (n + 1) + m = (n + m) + 1.
law add_comm unverifiedits file does not pass the checker (fails)source · line 49 · raw
@n:Nat -> @m:Nat -> {Nat.add(n, m) == Nat.add(m, n) : Nat}Addition is commutative: n + m = m + n.
law add_assoc unverifiedits file does not pass the checker (fails)source · line 71 · raw
@a:Nat -> @-b:Nat -> @-c:Nat -> {Nat.add(Nat.add(a, b), c) == Nat.add(a, Nat.add(b, c)) : Nat}Addition is associative: (a + b) + c = a + (b + c).
law add_left_comm unverifiedits file does not pass the checker (fails)source · line 86 · raw
@a:Nat -> @b:Nat -> @-c:Nat -> {Nat.add(a, Nat.add(b, c)) == Nat.add(b, Nat.add(a, c)) : Nat}Left commutativity of addition: a + (b + c) = b + (a + c).
law add_right_comm unverifiedits file does not pass the checker (fails)source · line 103 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.add(Nat.add(a, b), c) == Nat.add(Nat.add(a, c), b) : Nat}Right commutativity of addition: (a + b) + c = (a + c) + b.
law add_add_add_comm unverifiedits file does not pass the checker (fails)source · line 118 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @-d:Nat -> {Nat.add(Nat.add(a, b), Nat.add(c, d)) == Nat.add(Nat.add(a, c), Nat.add(b, d)) : Nat}Four-way regrouping of a sum: (a + b) + (c + d) = (a + c) + (b + d).
law succ_inj unverifiedits file does not pass the checker (fails)source · line 141 · raw
@-a:Nat -> @-b:Nat -> @e:{1n+a == 1n+b : Nat} -> {a == b : Nat}The successor function is injective: a + 1 = b + 1 implies a = b.
law zero_ne_succ unverifiedits file does not pass the checker (fails)source · line 156 · raw
@-n:Nat -> @_:{0n == 1n+n : Nat} -> EmptyZero is not a successor.
law succ_ne_zero unverifiedits file does not pass the checker (fails)source · line 168 · raw
@-n:Nat -> @_:{1n+n == 0n : Nat} -> EmptyA successor is not zero.
law add_left_cancel unverifiedits file does not pass the checker (fails)source · line 176 · raw
@a:Nat -> @-b:Nat -> @-c:Nat -> @e:{Nat.add(a, b) == Nat.add(a, c) : Nat} -> {b == c : Nat}Addition cancels on the left: a + b = a + c implies b = c.
law add_right_cancel unverifiedits file does not pass the checker (fails)source · line 191 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @e:{Nat.add(a, b) == Nat.add(c, b) : Nat} -> {a == c : Nat}Addition cancels on the right: a + b = c + b implies a = c.
law mul_zero unverifiedits file does not pass the checker (fails)source · line 203 · raw
@x:Nat -> {Nat.mul(x, 0n) == 0n : Nat}Zero absorbs multiplication on the right: x * 0 = 0.
law zero_mul unverifiedits file does not pass the checker (fails)source · line 215 · raw
@-x:Nat -> {Nat.mul(0n, x) == 0n : Nat}Zero absorbs multiplication on the left: 0 * x = 0.
law mul_one unverifiedits file does not pass the checker (fails)source · line 223 · raw
@x:Nat -> {Nat.mul(x, 1n) == x : Nat}One is a right identity for multiplication: x * 1 = x.
law one_mul unverifiedits file does not pass the checker (fails)source · line 236 · raw
@x:Nat -> {Nat.mul(1n, x) == x : Nat}One is a left identity for multiplication: 1 * x = x.
law mul_succ unverifiedits file does not pass the checker (fails)source · line 244 · raw
@n:Nat -> @m:Nat -> {Nat.mul(n, 1n+m) == Nat.add(Nat.mul(n, m), n) : Nat}Multiplying by a successor on the right: n * (m + 1) = n * m + n.
law succ_mul unverifiedits file does not pass the checker (fails)source · line 261 · raw
@n:Nat -> @m:Nat -> {Nat.mul(1n+n, m) == Nat.add(Nat.mul(n, m), m) : Nat}Multiplying by a successor on the left: (n + 1) * m = n * m + m.
law mul_comm unverifiedits file does not pass the checker (fails)source · line 271 · raw
@n:Nat -> @m:Nat -> {Nat.mul(n, m) == Nat.mul(m, n) : Nat}Multiplication is commutative: n * m = m * n.
law add_mul unverifiedits file does not pass the checker (fails)source · line 288 · raw
@a:Nat -> @-b:Nat -> @c:Nat -> {Nat.mul(Nat.add(a, b), c) == Nat.add(Nat.mul(a, c), Nat.mul(b, c)) : Nat}Multiplication distributes over addition on the right: (a + b) * c = a * c + b * c.
law mul_add unverifiedits file does not pass the checker (fails)source · line 305 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.mul(a, Nat.add(b, c)) == Nat.add(Nat.mul(a, b), Nat.mul(a, c)) : Nat}Multiplication distributes over addition on the left: a * (b + c) = a * b + a * c.
law mul_assoc unverifiedits file does not pass the checker (fails)source · line 322 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.mul(Nat.mul(a, b), c) == Nat.mul(a, Nat.mul(b, c)) : Nat}Multiplication is associative: (a * b) * c = a * (b * c).
law le_refl unverifiedits file does not pass the checker (fails)source · line 359 · raw
@a:Nat -> le(a, a)
Every natural is at most itself: a <= a.
law zero_le unverifiedits file does not pass the checker (fails)source · line 371 · raw
@b:Nat -> le(0n, b)
Zero is at most every natural: 0 <= b.
law le_succ unverifiedits file does not pass the checker (fails)source · line 383 · raw
@n:Nat -> le(n, 1n+n)
Every natural is at most its successor: n <= n + 1.
law le_add_right unverifiedits file does not pass the checker (fails)source · line 395 · raw
@n:Nat -> @k:Nat -> le(n, Nat.add(n, k))
Adding on the right never decreases a natural: n <= n + k.
law le_trans unverifiedits file does not pass the checker (fails)source · line 408 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @ab:le(a, b) -> @bc:le(b, c) -> le(a, c)
The order is transitive: a <= b and b <= c imply a <= c.
law le_antisymm unverifiedits file does not pass the checker (fails)source · line 430 · raw
@a:Nat -> @b:Nat -> @ab:le(a, b) -> @ba:le(b, a) -> {a == b : Nat}The order is antisymmetric: a <= b and b <= a imply a = b.
law le_total unverifiedits file does not pass the checker (fails)source · line 450 · raw
@a:Nat -> @b:Nat -> Or(le(a, b), le(b, a))
The order is total: a <= b or b <= a.
law le_total_d unverifiedits file does not pass the checker (fails)source · line 467 · raw
@a:Nat -> @b:Nat -> Either<&2, &2, le(a, b), le(b, a)>
The order is total, as a reusable sum: a <= b or b <= a.
law lt_irrefl unverifiedits file does not pass the checker (fails)source · line 484 · raw
@a:Nat -> @_:lt(a, a) -> Empty
No natural is less than itself.
law lt_trans unverifiedits file does not pass the checker (fails)source · line 496 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @ab:lt(a, b) -> @bc:lt(b, c) -> lt(a, c)
The strict order is transitive: a < b and b < c imply a < c.
law le_of_lt unverifiedits file does not pass the checker (fails)source · line 520 · raw
@a:Nat -> @b:Nat -> @h:lt(a, b) -> le(a, b)
A strict inequality implies the weak one: a < b implies a <= b.
law le_of_ge unverifiedits file does not pass the checker (fails)source · line 538 · raw
@a:Nat -> @b:Nat -> @h:ge(a, b) -> le(b, a)
Flipping a >= b gives b <= a.
law ge_of_le unverifiedits file does not pass the checker (fails)source · line 556 · raw
@a:Nat -> @b:Nat -> @h:le(b, a) -> ge(a, b)
Flipping b <= a gives a >= b.
law lt_of_gt unverifiedits file does not pass the checker (fails)source · line 574 · raw
@a:Nat -> @b:Nat -> @h:gt(a, b) -> lt(b, a)
Flipping a > b gives b < a.
law gt_of_lt unverifiedits file does not pass the checker (fails)source · line 592 · raw
@a:Nat -> @b:Nat -> @h:lt(b, a) -> gt(a, b)
Flipping b < a gives a > b.
law sub_zero unverifiedits file does not pass the checker (fails)source · line 610 · raw
@n:Nat -> {Nat.sub(n, 0n) == n : Nat}Subtracting zero changes nothing: n - 0 = n.
law zero_sub unverifiedits file does not pass the checker (fails)source · line 622 · raw
@n:Nat -> {Nat.sub(0n, n) == 0n : Nat}Truncated subtraction from zero is zero: 0 - n = 0.
law sub_self unverifiedits file does not pass the checker (fails)source · line 634 · raw
@n:Nat -> {Nat.sub(n, n) == 0n : Nat}A natural minus itself is zero: n - n = 0.
law succ_sub_succ unverifiedits file does not pass the checker (fails)source · line 646 · raw
@-n:Nat -> @-m:Nat -> {Nat.sub(1n+n, 1n+m) == Nat.sub(n, m) : Nat}Subtracting successors: (n + 1) - (m + 1) = n - m.
law add_sub_cancel unverifiedits file does not pass the checker (fails)source · line 655 · raw
@n:Nat -> @m:Nat -> {Nat.sub(Nat.add(n, m), m) == n : Nat}Adding then subtracting m cancels: (n + m) - m = n.
law add_sub_cancel_left unverifiedits file does not pass the checker (fails)source · line 672 · raw
@n:Nat -> @m:Nat -> {Nat.sub(Nat.add(n, m), n) == m : Nat}Adding then subtracting n cancels: (n + m) - n = m.
law sub_add_cancel unverifiedits file does not pass the checker (fails)source · line 685 · raw
@n:Nat -> @m:Nat -> @h:le(m, n) -> {Nat.add(Nat.sub(n, m), m) == n : Nat}If m <= n, subtracting and adding m back gives n: (n - m) + m = n.
law sub_sub unverifiedits file does not pass the checker (fails)source · line 706 · raw
@n:Nat -> @m:Nat -> @k:Nat -> {Nat.sub(Nat.sub(n, m), k) == Nat.sub(n, Nat.add(m, k)) : Nat}Subtracting twice is subtracting the sum: (n - m) - k = n - (m + k).
law sub_le unverifiedits file does not pass the checker (fails)source · line 724 · raw
@n:Nat -> @m:Nat -> le(Nat.sub(n, m), n)
Truncated subtraction never increases: n - m <= n.
law div_mod_eq unverifiedits file does not pass the checker (fails)source · line 776 · raw
@+a:Nat -> @+b:Nat -> {Nat.add(Nat.mul(Nat.div(a, 1n+b), 1n+b), Nat.mod(a, 1n+b)) == a : Nat}The division equation, for a positive divisor 1 + b: (a / (1 + b)) * (1 + b) + a % (1 + b) = a.
law div_eq_zero_of_le unverifiedits file does not pass the checker (fails)source · line 813 · raw
@+a:Nat -> @+b:Nat -> @h:le(a, b) -> {Nat.div(a, 1n+b) == 0n : Nat}A number at most b divides by 1 + b to zero: a <= b implies a / (1 + b) = 0.
law div_le_div unverifiedits file does not pass the checker (fails)source · line 856 · raw
@+a:Nat -> @+c:Nat -> @b:Nat -> @h:le(a, c) -> le(Nat.div(a, 1n+b), Nat.div(c, 1n+b))
Division by a positive divisor is monotone: a <= c implies a / (1 + b) <= c / (1 + b).
law add_div_left unverifiedits file does not pass the checker (fails)source · line 884 · raw
@+a:Nat -> @+b:Nat -> {Nat.div(Nat.add(1n+b, a), 1n+b) == 1n+Nat.div(a, 1n+b) : Nat}Adding the divisor adds one to the quotient: ((1 + b) + a) / (1 + b) = 1 + a / (1 + b).
law le_div_iff_mul_le unverifiedits file does not pass the checker (fails)source · line 941 · raw
@n:Nat -> @+a:Nat -> @+b:Nat -> {Nat.is_le(n, Nat.div(a, 1n+b)) == Nat.is_le(Nat.mul(n, 1n+b), a) : Bool}A quotient is compared by multiplying back: n <= a / (1 + b) tests as n * (1 + b) <= a.
law min_comm unverifiedits file does not pass the checker (fails)source · line 957 · raw
@a:Nat -> @b:Nat -> {Nat.min(a, b) == Nat.min(b, a) : Nat}Minimum is commutative.
law max_comm unverifiedits file does not pass the checker (fails)source · line 975 · raw
@a:Nat -> @b:Nat -> {Nat.max(a, b) == Nat.max(b, a) : Nat}Maximum is commutative.
law min_self unverifiedits file does not pass the checker (fails)source · line 993 · raw
@a:Nat -> {Nat.min(a, a) == a : Nat}The minimum of a natural and itself is itself.
law max_self unverifiedits file does not pass the checker (fails)source · line 1006 · raw
@a:Nat -> {Nat.max(a, a) == a : Nat}The maximum of a natural and itself is itself.
law min_zero unverifiedits file does not pass the checker (fails)source · line 1019 · raw
@a:Nat -> {Nat.min(a, 0n) == 0n : Nat}The minimum with zero is zero: min(a, 0) = 0.
law zero_min unverifiedits file does not pass the checker (fails)source · line 1031 · raw
@a:Nat -> {Nat.min(0n, a) == 0n : Nat}The minimum with zero is zero: min(0, a) = 0.
law max_zero unverifiedits file does not pass the checker (fails)source · line 1043 · raw
@a:Nat -> {Nat.max(a, 0n) == a : Nat}Zero is an identity for maximum: max(a, 0) = a.
law zero_max unverifiedits file does not pass the checker (fails)source · line 1055 · raw
@a:Nat -> {Nat.max(0n, a) == a : Nat}Zero is an identity for maximum: max(0, a) = a.
law min_assoc unverifiedits file does not pass the checker (fails)source · line 1067 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.min(Nat.min(a, b), c) == Nat.min(a, Nat.min(b, c)) : Nat}Minimum is associative.
law max_assoc unverifiedits file does not pass the checker (fails)source · line 1086 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.max(Nat.max(a, b), c) == Nat.max(a, Nat.max(b, c)) : Nat}Maximum is associative.
law min_add_max unverifiedits file does not pass the checker (fails)source · line 1105 · raw
@a:Nat -> @b:Nat -> {Nat.add(Nat.min(a, b), Nat.max(a, b)) == Nat.add(a, b) : Nat}The minimum plus the maximum is the sum: min(a, b) + max(a, b) = a + b.
law min_le_left unverifiedits file does not pass the checker (fails)source · line 1126 · raw
@a:Nat -> @b:Nat -> le(Nat.min(a, b), a)
The minimum is at most its left argument.
law min_le_right unverifiedits file does not pass the checker (fails)source · line 1143 · raw
@a:Nat -> @b:Nat -> le(Nat.min(a, b), b)
The minimum is at most its right argument.
law le_max_left unverifiedits file does not pass the checker (fails)source · line 1160 · raw
@a:Nat -> @b:Nat -> le(a, Nat.max(a, b))
The left argument is at most the maximum.
law le_max_right unverifiedits file does not pass the checker (fails)source · line 1177 · raw
@a:Nat -> @b:Nat -> le(b, Nat.max(a, b))
The right argument is at most the maximum.
law pow_zero unverifiedits file does not pass the checker (fails)source · line 1194 · raw
@-a:Nat -> {Nat.pow(a, 0n) == 1n : Nat}Any natural to the power zero is one.
law pow_succ unverifiedits file does not pass the checker (fails)source · line 1202 · raw
@-a:Nat -> @-n:Nat -> {Nat.pow(a, 1n+n) == Nat.mul(a, Nat.pow(a, n)) : Nat}A power with a successor exponent: a^(n+1) = a * a^n.
law pow_one unverifiedits file does not pass the checker (fails)source · line 1211 · raw
@a:Nat -> {Nat.pow(a, 1n) == a : Nat}Any natural to the power one is itself.
law one_pow unverifiedits file does not pass the checker (fails)source · line 1219 · raw
@n:Nat -> {Nat.pow(1n, n) == 1n : Nat}One to any power is one.
law pow_add unverifiedits file does not pass the checker (fails)source · line 1232 · raw
@a:Nat -> @m:Nat -> @n:Nat -> {Nat.pow(a, Nat.add(m, n)) == Nat.mul(Nat.pow(a, m), Nat.pow(a, n)) : Nat}Exponents add under multiplication: a^(m+n) = a^m * a^n.
law double_eq_add unverifiedits file does not pass the checker (fails)source · line 1252 · raw
@n:Nat -> {Nat.double(n) == Nat.add(n, n) : Nat}Doubling is adding a natural to itself.
law is_eq_refl unverifiedits file does not pass the checker (fails)source · line 1266 · raw
@n:Nat -> {Nat.is_eq(n, n) == True{} : Bool}Every natural tests equal to itself.
law is_eq_comm unverifiedits file does not pass the checker (fails)source · line 1278 · raw
@a:Nat -> @b:Nat -> {Nat.is_eq(a, b) == Nat.is_eq(b, a) : Bool}The equality test is symmetric.
law eq_of_is_eq unverifiedits file does not pass the checker (fails)source · line 1296 · raw
@a:Nat -> @b:Nat -> @h:{Nat.is_eq(a, b) == True{} : Bool} -> {a == b : Nat}If the equality test says true, the naturals are equal.
law is_ge_eq_is_le unverifiedits file does not pass the checker (fails)source · line 1315 · raw
@a:Nat -> @b:Nat -> {Nat.is_ge(a, b) == Nat.is_le(b, a) : Bool}A >= b tests the same as b <= a.
law is_gt_eq_is_lt unverifiedits file does not pass the checker (fails)source · line 1333 · raw
@a:Nat -> @b:Nat -> {Nat.is_gt(a, b) == Nat.is_lt(b, a) : Bool}A > b tests the same as b < a.
law is_lt_eq_succ_le unverifiedits file does not pass the checker (fails)source · line 1351 · raw
@a:Nat -> @b:Nat -> {Nat.is_lt(a, b) == Nat.is_le(1n+a, b) : Bool}A < b tests the same as a + 1 <= b.
law not_is_le unverifiedits file does not pass the checker (fails)source · line 1372 · raw
@a:Nat -> @b:Nat -> {Bool.not(Nat.is_le(a, b)) == Nat.is_lt(b, a) : Bool}Not (a <= b) tests the same as b < a.
law not_is_lt unverifiedits file does not pass the checker (fails)source · line 1389 · raw
@a:Nat -> @b:Nat -> {Bool.not(Nat.is_lt(a, b)) == Nat.is_le(b, a) : Bool}Not (a < b) tests the same as b <= a.
law lt_succ_self unverifiedits file does not pass the checker (fails)source · line 1406 · raw
@n:Nat -> lt(n, 1n+n)
Every natural is less than its successor: n < n + 1.
law succ_le_succ unverifiedits file does not pass the checker (fails)source · line 1418 · raw
@-a:Nat -> @-b:Nat -> @h:le(a, b) -> le(1n+a, 1n+b)
The successor preserves the order: a <= b implies a + 1 <= b + 1.
law le_of_succ_le_succ unverifiedits file does not pass the checker (fails)source · line 1428 · raw
@-a:Nat -> @-b:Nat -> @h:le(1n+a, 1n+b) -> le(a, b)
The order of successors is the order of the naturals: a + 1 <= b + 1 implies a <= b.
law lt_of_lt_of_le unverifiedits file does not pass the checker (fails)source · line 1438 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @ab:lt(a, b) -> @bc:le(b, c) -> lt(a, c)
A < b and b <= c imply a < c.
law lt_of_le_of_lt unverifiedits file does not pass the checker (fails)source · line 1462 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @ab:le(a, b) -> @bc:lt(b, c) -> lt(a, c)
A <= b and b < c imply a < c.
law add_le_add_left unverifiedits file does not pass the checker (fails)source · line 1486 · raw
@-a:Nat -> @-b:Nat -> @k:Nat -> @h:le(a, b) -> le(Nat.add(k, a), Nat.add(k, b))
Adding on the left preserves the order: a <= b implies k + a <= k + b.
law le_zero_eq unverifiedits file does not pass the checker (fails)source · line 1501 · raw
@n:Nat -> @h:le(n, 0n) -> {n == 0n : Nat}The only natural at most zero is zero.
law lt_zero unverifiedits file does not pass the checker (fails)source · line 1514 · raw
@n:Nat -> @_:lt(n, 0n) -> Empty
No natural is less than zero.
law not_le_of_lt unverifiedits file does not pass the checker (fails)source · line 1526 · raw
@a:Nat -> @b:Nat -> @h:lt(a, b) -> {Nat.is_le(b, a) == False{} : Bool}A strict inequality rules out the reverse weak one: a < b implies b <= a is false.
law not_lt_of_le unverifiedits file does not pass the checker (fails)source · line 1544 · raw
@a:Nat -> @b:Nat -> @h:le(a, b) -> {Nat.is_lt(b, a) == False{} : Bool}A weak inequality rules out the reverse strict one: a <= b implies b < a is false.
law lt_of_not_le unverifiedits file does not pass the checker (fails)source · line 1562 · raw
@a:Nat -> @b:Nat -> @h:{Nat.is_le(a, b) == False{} : Bool} -> lt(b, a)A failed weak test gives the reverse strict order: a <= b false implies b < a.
law le_of_not_lt unverifiedits file does not pass the checker (fails)source · line 1580 · raw
@a:Nat -> @b:Nat -> @h:{Nat.is_lt(a, b) == False{} : Bool} -> le(b, a)A failed strict test gives the reverse weak order: a < b false implies b <= a.
law lt_min unverifiedits file does not pass the checker (fails)source · line 1598 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @hb:lt(a, b) -> @hc:lt(a, c) -> lt(a, Nat.min(b, c))
A number below both bounds is below their minimum: a < b and a < c imply a < min b c.
law min_le_iff unverifiedits file does not pass the checker (fails)source · line 1632 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.is_le(Nat.min(a, b), c) == Bool.or(Nat.is_le(a, c), Nat.is_le(b, c)) : Bool}The minimum is at most c exactly when one argument is: min a b <= c tests as a <= c or b <= c.
law lt_max_iff unverifiedits file does not pass the checker (fails)source · line 1658 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.is_lt(a, Nat.max(b, c)) == Bool.or(Nat.is_lt(a, b), Nat.is_lt(a, c)) : Bool}The maximum is above a exactly when one argument is: a < max b c tests as a < b or a < c.
law sub_eq_zero_of_le unverifiedits file does not pass the checker (fails)source · line 1684 · raw
@a:Nat -> @b:Nat -> @h:le(a, b) -> {Nat.sub(a, b) == 0n : Nat}Subtracting a larger number gives zero: a <= b implies a - b = 0.
law succ_sub unverifiedits file does not pass the checker (fails)source · line 1702 · raw
@a:Nat -> @b:Nat -> @h:le(b, a) -> {Nat.sub(1n+a, b) == 1n+Nat.sub(a, b) : Nat}Above the subtrahend, a successor subtracts to a successor: b <= a implies (a + 1) - b = (a - b) + 1.
law add_sub_of_le unverifiedits file does not pass the checker (fails)source · line 1720 · raw
@a:Nat -> @b:Nat -> @h:le(a, b) -> {Nat.add(a, Nat.sub(b, a)) == b : Nat}Adding back what was subtracted restores the number: a <= b implies a + (b - a) = b.
law lt_sub_iff_add_lt unverifiedits file does not pass the checker (fails)source · line 1746 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.is_lt(a, Nat.sub(c, b)) == Nat.is_lt(Nat.add(b, a), c) : Bool}Comparing against a difference is comparing the sum: a < c - b tests as b + a < c.
law le_of_add_eq unverifiedits file does not pass the checker (fails)source · line 1764 · raw
@a:Nat -> @k:Nat -> @-b:Nat -> @e:{Nat.add(a, k) == b : Nat} -> le(a, b)A witnessed difference gives the order: a + k = b implies a <= b.
law mul_le_mul_right unverifiedits file does not pass the checker (fails)source · line 1776 · raw
@+a:Nat -> @+b:Nat -> @+k:Nat -> @h:le(a, b) -> le(Nat.mul(a, k), Nat.mul(b, k))
Multiplying on the right preserves the order: a <= b implies a * k <= b * k.
law add_zero_sym unverifiedits file does not pass the checker (fails)source · line 1792 · raw
@x:Nat -> {x == Nat.add(x, 0n) : Nat}Zero is a right identity for addition: x + 0 = x, reversed to rewrite toward the simple side.
law zero_add_sym unverifiedits file does not pass the checker (fails)source · line 1800 · raw
@-x:Nat -> {x == Nat.add(0n, x) : Nat}Zero is a left identity for addition: 0 + x = x, reversed to rewrite toward the simple side.
law add_succ_sym unverifiedits file does not pass the checker (fails)source · line 1808 · raw
@n:Nat -> @-m:Nat -> {1n+Nat.add(n, m) == Nat.add(n, 1n+m) : Nat}Adding a successor on the right: n + (m + 1) = (n + m) + 1, reversed to rewrite toward the simple side.
law succ_add_sym unverifiedits file does not pass the checker (fails)source · line 1817 · raw
@-n:Nat -> @-m:Nat -> {1n+Nat.add(n, m) == Nat.add(1n+n, m) : Nat}Adding a successor on the left: (n + 1) + m = (n + m) + 1, reversed to rewrite toward the simple side.
law add_comm_sym unverifiedits file does not pass the checker (fails)source · line 1826 · raw
@n:Nat -> @m:Nat -> {Nat.add(m, n) == Nat.add(n, m) : Nat}Addition is commutative: n + m = m + n, reversed to rewrite toward the simple side.
law add_assoc_sym unverifiedits file does not pass the checker (fails)source · line 1835 · raw
@a:Nat -> @-b:Nat -> @-c:Nat -> {Nat.add(a, Nat.add(b, c)) == Nat.add(Nat.add(a, b), c) : Nat}Addition is associative: (a + b) + c = a + (b + c), reversed to rewrite toward the simple side.
law add_left_comm_sym unverifiedits file does not pass the checker (fails)source · line 1845 · raw
@a:Nat -> @b:Nat -> @-c:Nat -> {Nat.add(b, Nat.add(a, c)) == Nat.add(a, Nat.add(b, c)) : Nat}Left commutativity of addition: a + (b + c) = b + (a + c), reversed to rewrite toward the simple side.
law add_right_comm_sym unverifiedits file does not pass the checker (fails)source · line 1855 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.add(Nat.add(a, c), b) == Nat.add(Nat.add(a, b), c) : Nat}Right commutativity of addition: (a + b) + c = (a + c) + b, reversed to rewrite toward the simple side.
law add_add_add_comm_sym unverifiedits file does not pass the checker (fails)source · line 1865 · raw
@a:Nat -> @b:Nat -> @c:Nat -> @-d:Nat -> {Nat.add(Nat.add(a, c), Nat.add(b, d)) == Nat.add(Nat.add(a, b), Nat.add(c, d)) : Nat}Four-way regrouping of a sum: (a + b) + (c + d) = (a + c) + (b + d), reversed to rewrite toward the simple side.
law mul_zero_sym unverifiedits file does not pass the checker (fails)source · line 1876 · raw
@x:Nat -> {0n == Nat.mul(x, 0n) : Nat}Zero absorbs multiplication on the right: x * 0 = 0, reversed to rewrite toward the simple side.
law zero_mul_sym unverifiedits file does not pass the checker (fails)source · line 1884 · raw
@-x:Nat -> {0n == Nat.mul(0n, x) : Nat}Zero absorbs multiplication on the left: 0 * x = 0, reversed to rewrite toward the simple side.
law mul_one_sym unverifiedits file does not pass the checker (fails)source · line 1892 · raw
@x:Nat -> {x == Nat.mul(x, 1n) : Nat}One is a right identity for multiplication: x * 1 = x, reversed to rewrite toward the simple side.
law one_mul_sym unverifiedits file does not pass the checker (fails)source · line 1900 · raw
@x:Nat -> {x == Nat.mul(1n, x) : Nat}One is a left identity for multiplication: 1 * x = x, reversed to rewrite toward the simple side.
law mul_succ_sym unverifiedits file does not pass the checker (fails)source · line 1908 · raw
@n:Nat -> @m:Nat -> {Nat.add(Nat.mul(n, m), n) == Nat.mul(n, 1n+m) : Nat}Multiplying by a successor on the right: n * (m + 1) = n * m + n, reversed to rewrite toward the simple side.
law succ_mul_sym unverifiedits file does not pass the checker (fails)source · line 1917 · raw
@n:Nat -> @m:Nat -> {Nat.add(Nat.mul(n, m), m) == Nat.mul(1n+n, m) : Nat}Multiplying by a successor on the left: (n + 1) * m = n * m + m, reversed to rewrite toward the simple side.
law mul_comm_sym unverifiedits file does not pass the checker (fails)source · line 1926 · raw
@n:Nat -> @m:Nat -> {Nat.mul(m, n) == Nat.mul(n, m) : Nat}Multiplication is commutative: n * m = m * n, reversed to rewrite toward the simple side.
law add_mul_sym unverifiedits file does not pass the checker (fails)source · line 1935 · raw
@a:Nat -> @-b:Nat -> @c:Nat -> {Nat.add(Nat.mul(a, c), Nat.mul(b, c)) == Nat.mul(Nat.add(a, b), c) : Nat}Multiplication distributes over addition on the right: (a + b) * c = a * c + b * c, reversed to rewrite toward the simple side.
law mul_add_sym unverifiedits file does not pass the checker (fails)source · line 1945 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.add(Nat.mul(a, b), Nat.mul(a, c)) == Nat.mul(a, Nat.add(b, c)) : Nat}Multiplication distributes over addition on the left: a * (b + c) = a * b + a * c, reversed to rewrite toward the simple side.
law mul_assoc_sym unverifiedits file does not pass the checker (fails)source · line 1955 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.mul(a, Nat.mul(b, c)) == Nat.mul(Nat.mul(a, b), c) : Nat}Multiplication is associative: (a * b) * c = a * (b * c), reversed to rewrite toward the simple side.
law sub_zero_sym unverifiedits file does not pass the checker (fails)source · line 1965 · raw
@n:Nat -> {n == Nat.sub(n, 0n) : Nat}Subtracting zero changes nothing: n - 0 = n, reversed to rewrite toward the simple side.
law zero_sub_sym unverifiedits file does not pass the checker (fails)source · line 1973 · raw
@n:Nat -> {0n == Nat.sub(0n, n) : Nat}Truncated subtraction from zero is zero: 0 - n = 0, reversed to rewrite toward the simple side.
law sub_self_sym unverifiedits file does not pass the checker (fails)source · line 1981 · raw
@n:Nat -> {0n == Nat.sub(n, n) : Nat}A natural minus itself is zero: n - n = 0, reversed to rewrite toward the simple side.
law succ_sub_succ_sym unverifiedits file does not pass the checker (fails)source · line 1989 · raw
@-n:Nat -> @-m:Nat -> {Nat.sub(n, m) == Nat.sub(1n+n, 1n+m) : Nat}Subtracting successors: (n + 1) - (m + 1) = n - m, reversed to rewrite toward the simple side.
law add_sub_cancel_sym unverifiedits file does not pass the checker (fails)source · line 1998 · raw
@n:Nat -> @m:Nat -> {n == Nat.sub(Nat.add(n, m), m) : Nat}Adding then subtracting m cancels: (n + m) - m = n, reversed to rewrite toward the simple side.
law add_sub_cancel_left_sym unverifiedits file does not pass the checker (fails)source · line 2007 · raw
@n:Nat -> @m:Nat -> {m == Nat.sub(Nat.add(n, m), n) : Nat}Adding then subtracting n cancels: (n + m) - n = m, reversed to rewrite toward the simple side.
law sub_sub_sym unverifiedits file does not pass the checker (fails)source · line 2016 · raw
@n:Nat -> @m:Nat -> @k:Nat -> {Nat.sub(n, Nat.add(m, k)) == Nat.sub(Nat.sub(n, m), k) : Nat}Subtracting twice is subtracting the sum: (n - m) - k = n - (m + k), reversed to rewrite toward the simple side.
law div_mod_eq_sym unverifiedits file does not pass the checker (fails)source · line 2026 · raw
@+a:Nat -> @+b:Nat -> {a == Nat.add(Nat.mul(Nat.div(a, 1n+b), 1n+b), Nat.mod(a, 1n+b)) : Nat}The division equation, for a positive divisor 1 + b: (a / (1 + b)) * (1 + b) + a % (1 + b) = a, reversed to rewrite toward the simple side.
law add_div_left_sym unverifiedits file does not pass the checker (fails)source · line 2035 · raw
@+a:Nat -> @+b:Nat -> {1n+Nat.div(a, 1n+b) == Nat.div(Nat.add(1n+b, a), 1n+b) : Nat}Adding the divisor adds one to the quotient: ((1 + b) + a) / (1 + b) = 1 + a / (1 + b), reversed to rewrite toward the simple side.
law le_div_iff_mul_le_sym unverifiedits file does not pass the checker (fails)source · line 2044 · raw
@n:Nat -> @+a:Nat -> @+b:Nat -> {Nat.is_le(Nat.mul(n, 1n+b), a) == Nat.is_le(n, Nat.div(a, 1n+b)) : Bool}A quotient is compared by multiplying back: n <= a / (1 + b) tests as n * (1 + b) <= a, reversed to rewrite toward the simple side.
law min_comm_sym unverifiedits file does not pass the checker (fails)source · line 2054 · raw
@a:Nat -> @b:Nat -> {Nat.min(b, a) == Nat.min(a, b) : Nat}Minimum is commutative, reversed to rewrite toward the simple side.
law max_comm_sym unverifiedits file does not pass the checker (fails)source · line 2063 · raw
@a:Nat -> @b:Nat -> {Nat.max(b, a) == Nat.max(a, b) : Nat}Maximum is commutative, reversed to rewrite toward the simple side.
law min_self_sym unverifiedits file does not pass the checker (fails)source · line 2072 · raw
@a:Nat -> {a == Nat.min(a, a) : Nat}The minimum of a natural and itself is itself, reversed to rewrite toward the simple side.
law max_self_sym unverifiedits file does not pass the checker (fails)source · line 2080 · raw
@a:Nat -> {a == Nat.max(a, a) : Nat}The maximum of a natural and itself is itself, reversed to rewrite toward the simple side.
law min_zero_sym unverifiedits file does not pass the checker (fails)source · line 2088 · raw
@a:Nat -> {0n == Nat.min(a, 0n) : Nat}The minimum with zero is zero: min(a, 0) = 0, reversed to rewrite toward the simple side.
law zero_min_sym unverifiedits file does not pass the checker (fails)source · line 2096 · raw
@a:Nat -> {0n == Nat.min(0n, a) : Nat}The minimum with zero is zero: min(0, a) = 0, reversed to rewrite toward the simple side.
law max_zero_sym unverifiedits file does not pass the checker (fails)source · line 2104 · raw
@a:Nat -> {a == Nat.max(a, 0n) : Nat}Zero is an identity for maximum: max(a, 0) = a, reversed to rewrite toward the simple side.
law zero_max_sym unverifiedits file does not pass the checker (fails)source · line 2112 · raw
@a:Nat -> {a == Nat.max(0n, a) : Nat}Zero is an identity for maximum: max(0, a) = a, reversed to rewrite toward the simple side.
law min_assoc_sym unverifiedits file does not pass the checker (fails)source · line 2120 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.min(a, Nat.min(b, c)) == Nat.min(Nat.min(a, b), c) : Nat}Minimum is associative, reversed to rewrite toward the simple side.
law max_assoc_sym unverifiedits file does not pass the checker (fails)source · line 2130 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.max(a, Nat.max(b, c)) == Nat.max(Nat.max(a, b), c) : Nat}Maximum is associative, reversed to rewrite toward the simple side.
law min_add_max_sym unverifiedits file does not pass the checker (fails)source · line 2140 · raw
@a:Nat -> @b:Nat -> {Nat.add(a, b) == Nat.add(Nat.min(a, b), Nat.max(a, b)) : Nat}The minimum plus the maximum is the sum: min(a, b) + max(a, b) = a + b, reversed to rewrite toward the simple side.
law pow_zero_sym unverifiedits file does not pass the checker (fails)source · line 2149 · raw
@-a:Nat -> {1n == Nat.pow(a, 0n) : Nat}Any natural to the power zero is one, reversed to rewrite toward the simple side.
law pow_succ_sym unverifiedits file does not pass the checker (fails)source · line 2157 · raw
@-a:Nat -> @-n:Nat -> {Nat.mul(a, Nat.pow(a, n)) == Nat.pow(a, 1n+n) : Nat}A power with a successor exponent: a^(n+1) = a * a^n, reversed to rewrite toward the simple side.
law pow_one_sym unverifiedits file does not pass the checker (fails)source · line 2166 · raw
@a:Nat -> {a == Nat.pow(a, 1n) : Nat}Any natural to the power one is itself, reversed to rewrite toward the simple side.
law one_pow_sym unverifiedits file does not pass the checker (fails)source · line 2174 · raw
@n:Nat -> {1n == Nat.pow(1n, n) : Nat}One to any power is one, reversed to rewrite toward the simple side.
law pow_add_sym unverifiedits file does not pass the checker (fails)source · line 2182 · raw
@a:Nat -> @m:Nat -> @n:Nat -> {Nat.mul(Nat.pow(a, m), Nat.pow(a, n)) == Nat.pow(a, Nat.add(m, n)) : Nat}Exponents add under multiplication: a^(m+n) = a^m * a^n, reversed to rewrite toward the simple side.
law double_eq_add_sym unverifiedits file does not pass the checker (fails)source · line 2192 · raw
@n:Nat -> {Nat.add(n, n) == Nat.double(n) : Nat}Doubling is adding a natural to itself, reversed to rewrite toward the simple side.
law is_eq_refl_sym unverifiedits file does not pass the checker (fails)source · line 2200 · raw
@n:Nat -> {True{} == Nat.is_eq(n, n) : Bool}Every natural tests equal to itself, reversed to rewrite toward the simple side.
law is_eq_comm_sym unverifiedits file does not pass the checker (fails)source · line 2208 · raw
@a:Nat -> @b:Nat -> {Nat.is_eq(b, a) == Nat.is_eq(a, b) : Bool}The equality test is symmetric, reversed to rewrite toward the simple side.
law is_ge_eq_is_le_sym unverifiedits file does not pass the checker (fails)source · line 2217 · raw
@a:Nat -> @b:Nat -> {Nat.is_le(b, a) == Nat.is_ge(a, b) : Bool}A >= b tests the same as b <= a, reversed to rewrite toward the simple side.
law is_gt_eq_is_lt_sym unverifiedits file does not pass the checker (fails)source · line 2226 · raw
@a:Nat -> @b:Nat -> {Nat.is_lt(b, a) == Nat.is_gt(a, b) : Bool}A > b tests the same as b < a, reversed to rewrite toward the simple side.
law is_lt_eq_succ_le_sym unverifiedits file does not pass the checker (fails)source · line 2235 · raw
@a:Nat -> @b:Nat -> {Nat.is_le(1n+a, b) == Nat.is_lt(a, b) : Bool}A < b tests the same as a + 1 <= b, reversed to rewrite toward the simple side.
law not_is_le_sym unverifiedits file does not pass the checker (fails)source · line 2244 · raw
@a:Nat -> @b:Nat -> {Nat.is_lt(b, a) == Bool.not(Nat.is_le(a, b)) : Bool}Not (a <= b) tests the same as b < a, reversed to rewrite toward the simple side.
law not_is_lt_sym unverifiedits file does not pass the checker (fails)source · line 2253 · raw
@a:Nat -> @b:Nat -> {Nat.is_le(b, a) == Bool.not(Nat.is_lt(a, b)) : Bool}Not (a < b) tests the same as b <= a, reversed to rewrite toward the simple side.
law min_le_iff_sym unverifiedits file does not pass the checker (fails)source · line 2262 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Bool.or(Nat.is_le(a, c), Nat.is_le(b, c)) == Nat.is_le(Nat.min(a, b), c) : Bool}The minimum is at most c exactly when one argument is: min a b <= c tests as a <= c or b <= c, reversed to rewrite toward the simple side.
law lt_max_iff_sym unverifiedits file does not pass the checker (fails)source · line 2272 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Bool.or(Nat.is_lt(a, b), Nat.is_lt(a, c)) == Nat.is_lt(a, Nat.max(b, c)) : Bool}The maximum is above a exactly when one argument is: a < max b c tests as a < b or a < c, reversed to rewrite toward the simple side.
law lt_sub_iff_add_lt_sym unverifiedits file does not pass the checker (fails)source · line 2282 · raw
@a:Nat -> @b:Nat -> @c:Nat -> {Nat.is_lt(Nat.add(b, a), c) == Nat.is_lt(a, Nat.sub(c, b)) : Bool}Comparing against a difference is comparing the sum: a < c - b tests as b + a < c, reversed to rewrite toward the simple side.
Definitions
def internal_pred source · line 133 · raw
@n:Nat -> Nat
def internal_zero_ne_succ source · line 151 · raw
@-n:Nat -> @e:{0n == 1n+n : Nat} -> Empty
def internal_succ_ne_zero source · line 163 · raw
@-n:Nat -> @e:{1n+n == 0n : Nat} -> Empty
def le source · line 339 · raw
@a:Nat -> @b:Nat -> Data
The order a <= b on naturals, as a reusable proposition.
def lt source · line 343 · raw
@a:Nat -> @b:Nat -> Data
The strict order a < b on naturals, as a reusable proposition.
def ge source · line 347 · raw
@a:Nat -> @b:Nat -> Data
The order a >= b on naturals, as a reusable proposition.
def gt source · line 351 · raw
@a:Nat -> @b:Nat -> Data
The strict order a > b on naturals, as a reusable proposition.
def internal_false_ne_true source · line 354 · raw
@e:{False{} == True{} : Bool} -> Empty
def internal_div_true_ne_false source · line 740 · raw
@h:{True{} == False{} : Bool} -> Empty
def internal_div_add_zero_r source · line 743 · raw
@a:Nat -> {a == Nat.add(a, 0n) : Nat}
def internal_div_le_refl source · line 746 · raw
@a:Nat -> {True{} == Nat.is_le(a, a) : Bool}
def internal_div_zero_le source · line 749 · raw
@x:Nat -> {True{} == Nat.is_le(0n, x) : Bool}
def internal_div_block_start source · line 752 · raw
@-bp:Nat -> @+r:Nat -> @h:{bp == Nat.add(r, 0n) : Nat} -> {bp == r : Nat}
def internal_div_block_step source · line 756 · raw
@-bp:Nat -> @r:Nat -> @-mp:Nat -> @h:{bp == Nat.add(r, 1n+mp) : Nat} -> {bp == 1n+Nat.add(r, mp) : Nat}
def internal_div_go_eq source · line 760 · raw
@n:Nat -> @m:Nat -> @+bp:Nat -> @+d:Nat -> @+r:Nat -> @+h:{bp == Nat.add(r, m) : Nat} -> {Nat.add(Nat.mul(Nat.div.fin(Nat.divmod.go(n, m, d, r)), 1n+bp), Nat.mod.fin(Nat.divmod.go(n, m, d, r))) == Nat.add(n, Nat.add(Nat.mul(d, 1n+bp), r)) : Nat}
def internal_div_wit_succ source · line 785 · raw
@+ap:Nat -> @+bq:Nat -> @w:(&k:Nat -> {Nat.add(ap, k) == bq : Nat}) -> &k:Nat -> {Nat.add(1n+ap, k) == 1n+bq : Nat}
def internal_div_le_wit source · line 790 · raw
@a:Nat -> @b:Nat -> @h:{Nat.is_le(a, b) == True{} : Bool} -> &k:Nat -> {Nat.add(a, k) == b : Nat}
def internal_div_go_small source · line 799 · raw
@n:Nat -> @+k:Nat -> @+d:Nat -> @r:Nat -> {d == Nat.div.fin(Nat.divmod.go(n, Nat.add(n, k), d, r)) : Nat}
def internal_div_zero_of_wit source · line 806 · raw
@+a:Nat -> @+b:Nat -> @w:(&k:Nat -> {Nat.add(a, k) == b : Nat}) -> {Nat.div(a, 1n+b) == 0n : Nat}
def internal_div_le_succ_r source · line 822 · raw
@j:Nat -> @d:Nat -> @h:{True{} == Nat.is_le(j, d) : Bool} -> {True{} == Nat.is_le(j, 1n+d) : Bool}
def internal_div_go_d_ge source · line 831 · raw
@+j:Nat -> @n:Nat -> @m:Nat -> @+d:Nat -> @r:Nat -> @h:{True{} == Nat.is_le(j, d) : Bool} -> {True{} == Nat.is_le(j, Nat.div.fin(Nat.divmod.go(n, m, d, r))) : Bool}
def internal_div_mono_go source · line 840 · raw
@a:Nat -> @m:Nat -> @+d:Nat -> @r:Nat -> @+k:Nat -> {True{} == Nat.is_le(Nat.div.fin(Nat.divmod.go(a, m, d, r)), Nat.div.fin(Nat.divmod.go(Nat.add(a, k), m, d, r))) : Bool}
def internal_div_mono_wit source · line 849 · raw
@+a:Nat -> @+c:Nat -> @b:Nat -> @w:(&k:Nat -> {Nat.add(a, k) == c : Nat}) -> le(Nat.div(a, 1n+b), Nat.div(c, 1n+b))
def internal_div_go_shift source · line 866 · raw
@n:Nat -> @m:Nat -> @+d:Nat -> @+r:Nat -> {1n+Nat.div.fin(Nat.divmod.go(n, m, d, r)) == Nat.div.fin(Nat.divmod.go(n, m, 1n+d, r)) : Nat}
def internal_div_go_run source · line 875 · raw
@m:Nat -> @+a:Nat -> @+d:Nat -> @+r:Nat -> {Nat.divmod.go(a, Nat.add(m, r), 1n+d, 0n) == Nat.divmod.go(Nat.add(1n+m, a), m, d, r) : Pair(Nat, Nat)}
def internal_div_le_add_cancel source · line 894 · raw
@t:Nat -> @+x:Nat -> @+y:Nat -> {Nat.is_le(x, y) == Nat.is_le(Nat.add(t, x), Nat.add(t, y)) : Bool}
def internal_div_gt_add source · line 901 · raw
@a:Nat -> @+y:Nat -> {False{} == Nat.is_le(1n+Nat.add(a, y), a) : Bool}
def internal_div_not_succ_le source · line 908 · raw
@a:Nat -> @bp:Nat -> @h:{False{} == Nat.is_le(1n+bp, a) : Bool} -> {Nat.is_le(a, bp) == True{} : Bool}
def internal_div_le_big source · line 917 · raw
@+np:Nat -> @+a:Nat -> @+bp:Nat -> @w:(&k:Nat -> {Nat.add(1n+bp, k) == a : Nat}) -> @ih:(@x:Nat -> {Nat.is_le(np, Nat.div(x, 1n+bp)) == Nat.is_le(Nat.mul(np, 1n+bp), x) : Bool}) -> {Nat.is_le(1n+np, Nat.div(a, 1n+bp)) == Nat.is_le(Nat.mul(1n+np, 1n+bp), a) : Bool}
def internal_div_le_small source · line 925 · raw
@+np:Nat -> @+a:Nat -> @+bp:Nat -> @w:(&k:Nat -> {Nat.add(a, k) == bp : Nat}) -> {Nat.is_le(1n+np, Nat.div(a, 1n+bp)) == Nat.is_le(Nat.mul(1n+np, 1n+bp), a) : Bool}
def internal_div_le_step source · line 933 · raw
@+np:Nat -> @+a:Nat -> @+bp:Nat -> @b:Bool -> @eb:{b == Nat.is_le(1n+bp, a) : Bool} -> @ih:(@x:Nat -> {Nat.is_le(np, Nat.div(x, 1n+bp)) == Nat.is_le(Nat.mul(np, 1n+bp), x) : Bool}) -> {Nat.is_le(1n+np, Nat.div(a, 1n+bp)) == Nat.is_le(Nat.mul(1n+np, 1n+bp), a) : Bool}
def internal_or_true_sym source · line 1617 · raw
@x:Bool -> {True{} == Bool.or(x, True{}) : Bool}
def internal_or_false_sym source · line 1624 · raw
@x:Bool -> {x == Bool.or(x, False{}) : Bool}
def internal_lt_sub_zero source · line 1738 · raw
@a:Nat -> @p:Nat -> {Nat.is_lt(a, Nat.sub(0n, 1n+p)) == Nat.is_lt(Nat.add(1n+p, a), 0n) : Bool}