Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Verify.DayOfYear.Notation.monthIfLt_ = Lean.ParserDescr.node `Verify.DayOfYear.Notation.monthIfLt_ 1022 (Lean.ParserDescr.const `num)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Get day of year of last day of all months by Time.dy
Equations
- Verify.DayOfYear.dyOfLastDayOfMonth_map isleap = List.map (fun (m : Nat) => Time.dyOfLastDayOfMonth isleap m) (List.range' 1 12)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Verify.DayOfYear.monthLastDayAsDayOfYear_eq_dy
(isleap : Bool)
(a : Nat × Nat × Nat)
:
a ∈ Time.monthLastDayAsDayOfYear' isleap → a.snd.snd = Time.dyOfLastDayOfMonth isleap a.fst
Get last day of month as day of year by lookup in monthLastDayAsDayOfYear
is equal to compute by Time.dy
theorem
Verify.DayOfYear.dy'_hlt
{dt : Time.Date}
{ml : { m : Nat × Nat // Verify.MonthLength.monthLengthsOfDate m dt }}
(h : dt.Day.val < ml.val.snd)
:
Time.dy' (Time.isLeapYear dt.Year) dt.Month dt.Day < Time.dy' (Time.isLeapYear dt.Year) dt.Month ⟨ml.val.snd, ⋯⟩
theorem
Verify.DayOfYear.dy'_hle
{dt : Time.Date}
(ml : { m : Nat × Nat // Verify.MonthLength.monthLengthsOfDate m dt })
:
Time.dy' (Time.isLeapYear dt.Year) dt.Month ⟨ml.val.snd, ⋯⟩ ≤ if Time.isLeapYear dt.Year = true then 366 else 365
theorem
Verify.DayOfYear.dy'_hlt'
{dt : Time.Date}
{ml : { m : Nat × Nat // Verify.MonthLength.monthLengthsOfDate m dt }}
(h : dt.Day.val < ml.val.snd)
:
Time.dy' (Time.isLeapYear dt.Year) dt.Month dt.Day < if Time.isLeapYear dt.Year = true then 366 else 365
theorem
Verify.DayOfYear.dy'_add_one_hle
{dt : Time.Date}
{ml : { m : Nat × Nat // Verify.MonthLength.monthLengthsOfDate m dt }}
(h : dt.Day.val < ml.val.snd)
:
Time.dy' (Time.isLeapYear dt.Year) dt.Month dt.Day + 1 ≤ if Time.isLeapYear dt.Year = true then 366 else 365
theorem
Verify.DayOfYear.dy'_lt_of_month_lt
{dt : Time.Date}
(h : dt.Month.val < 12)
:
Time.dy' (Time.isLeapYear dt.Year) dt.Month dt.Day < if Time.isLeapYear dt.Year = true then 366 else 365
theorem
Verify.DayOfYear.dy_lt_of_month_lt
{dt : Time.Date}
(h : dt.Month.val < 12)
:
match (Time.dateToOrdinalDate dt).dayOfYear with
| Time.DayOfYear.common dy => dy.val < 365
| Time.DayOfYear.leap dy => dy.val < 366
theorem
Verify.DayOfYear.dy_lt_of_day_lt
{dt : Time.Date}
{ml : { m : Nat × Nat // Verify.MonthLength.monthLengthsOfDate m dt }}
(h : dt.Day.val < ml.val.snd)
:
match (Time.dateToOrdinalDate dt).dayOfYear with
| Time.DayOfYear.common dy => dy.val < 365
| Time.DayOfYear.leap dy => dy.val < 366
theorem
Verify.DayOfYear.dy_lt_of_day_or_month_lt
{dt : Time.Date}
{ml : { m : Nat × Nat // Verify.MonthLength.monthLengthsOfDate m dt }}
(h : dt.Day.val < ml.val.snd ∨ dt.Month.val < 12)
:
match (Time.dateToOrdinalDate dt).dayOfYear with
| Time.DayOfYear.common dy => dy.val < 365
| Time.DayOfYear.leap dy => dy.val < 366
theorem
Verify.DayOfYear.month_11_if_lt
{dt : Time.Date}
(isLeap : Bool)
{ml : { m : Nat × Nat // Verify.MonthLength.monthLengthsOfDate m dt }}
(hml : ml = Verify.MonthLength.monthLengths_of_date dt)
(h : dt.Day.val < ml.val.snd)
(hl : Time.isLeapYear dt.Year = isLeap)
: