diff options
| author | Andreas Grois <andi@grois.info> | 2024-09-23 21:31:41 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2024-09-23 21:31:41 +0200 |
| commit | 5d08e39abca75b775bb7636973bb9c9a3bb908ac (patch) | |
| tree | 99ba141c3d485c17ea261694ea48699d0b9aa441 /Common/Nat.lean | |
| parent | fda8a5b06d63aaa6b7db2ca7b2a7c0bd321bd16e (diff) | |
Continue Day12
Diffstat (limited to 'Common/Nat.lean')
| -rw-r--r-- | Common/Nat.lean | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Common/Nat.lean b/Common/Nat.lean index 4c25315..a863a49 100644 --- a/Common/Nat.lean +++ b/Common/Nat.lean @@ -11,3 +11,7 @@ theorem two_d_coordinate_to_index_lt_size {x y w h: Nat} (h₁ : x < w) (h₂ : |> Nat.lt_of_lt_of_le h₁ |> λx↦(Nat.add_lt_add_right) x (w * y) |> (Nat.sub_add_cancel (Nat.le_of_lt ((Nat.mul_lt_mul_left (Nat.zero_lt_of_lt h₁)).mpr h₂))).subst + +theorem gt_of_sub_lt {a b c : Nat} (h₁ : a - b < a - c) : c < b := by omega + +theorem sub_lt_of_gt {a b c : Nat} (h₁ : b ≤ a) (h₂ : c < b) : a - b < a - c := by omega |
