From 5d08e39abca75b775bb7636973bb9c9a3bb908ac Mon Sep 17 00:00:00 2001
From: Andreas Grois <andi@grois.info>
Date: Mon, 23 Sep 2024 21:31:41 +0200
Subject: Continue Day12

---
 Common/Nat.lean | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'Common/Nat.lean')

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
-- 
cgit v1.2.3

