From ce7214e07a766bc1e5ab02346e42eb6ca441c509 Mon Sep 17 00:00:00 2001
From: Andreas Grois <andi@grois.info>
Date: Fri, 22 Nov 2024 22:10:48 +0100
Subject: Fix deprecation warnings for Lean 4.13

---
 Day5.lean | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'Day5.lean')

diff --git a/Day5.lean b/Day5.lean
index f1c96a5..44c3908 100644
--- a/Day5.lean
+++ b/Day5.lean
@@ -180,7 +180,7 @@ def part1 (input : ((List Seed) × Almanach)) : Option Nat :=
                       ∘ a.soilToFertilizer.apply
                       ∘ a.seedsToSoil.apply
   let locations := input.fst.map seedToLocation
-  NatId.toNat <$> locations.minimum?
+  NatId.toNat <$> locations.min?
 
 
 -- Part 2 seems unmanageable by brute force.
@@ -271,7 +271,7 @@ private def part1_2 (input : ((List Seed) × Almanach)) : Option Nat :=
   let seedsToLocation := seedsToHumidity.combine (Mappings2.fromMappings a.humidityToLocation)
   let seedToLocation  := seedsToLocation.apply
   let locations := input.fst.map seedToLocation
-  NatId.toNat <$> locations.minimum?
+  NatId.toNat <$> locations.min?
 
 private structure SeedRange where
   start : Seed
@@ -315,7 +315,7 @@ def part2 (input : ((List Seed) × Almanach)) : Option Nat :=
   let potentialSeeds := seedToLocation.mappings.filterMap λ m ↦
     (SeedRange.findSmallestSeedAbove seedRanges m.start) -- could filter by range end, but who cares?
   let locations := potentialSeeds.map seedToLocation.apply
-  NatId.toNat <$> locations.minimum?
+  NatId.toNat <$> locations.min?
 
 open DayPart
 instance : Parse ⟨5, by simp⟩ (ι := (List Seed) × Almanach) where
-- 
cgit v1.2.3

