Documentation

Time.Verify.Calendar.OrdinalDate

Verify date calculations #

Main theorems:

Get next_date of dt:

  • if dt.dayOfYear is less then days in dt.year then add 1 to dt.dayOfYear,
  • else add 1 to dt.Year and set dt.dayOfYear to 1.
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
      theorem Verify.OrdinalDate.Int.self_mul_ediv_le {x k : Int} (h : k 0) :
      x / k * k x
      theorem Verify.OrdinalDate.Icc.minus_one_add_lt {a b : Nat} (x : Time.Icc a b) :
      -1 + x.val < b
      theorem Verify.OrdinalDate.assoc' (a b c : Int) :
      a - c + b = a + (-c + b)
      Equations
      Instances For
        Equations
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Verify.OrdinalDate.cent_eq (dt : Time.OrdinalDate) (h : ¬(dt.year % 400 = 0 (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d).val = 366)) :
            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
                      theorem Verify.OrdinalDate.year_eq_if_mod_eq_146096 (dt : Time.OrdinalDate) (a : Time.Icc 1 366) (h : days_since_1_1_1_mod_146097 dt a = 146096) :
                      quadcent dt * 400 + 3 * 100 + 24 * 4 + 4 = dt.year
                      theorem Verify.OrdinalDate.d'_add_eq (dt : Time.OrdinalDate) :
                      d' dt = (dt.year - 1) % 4 * 365 + (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d).val - 1
                      theorem Verify.OrdinalDate.year_eq_if_days_eq_1460 (dt : Time.OrdinalDate) (hmod : d' dt = 1460) :
                      quadcent dt * 400 + cent dt * 100 + quad dt * 4 + 4 = dt.year
                      theorem Verify.OrdinalDate.year_lt_mod_1460_eq (dt : Time.OrdinalDate) (hNot : ¬(dt.year % 400 = 0 (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d).val = 366)) :
                      theorem Verify.OrdinalDate.d'_eq (dt : Time.OrdinalDate) (h : ¬(dt.year % 400 = 0 (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d).val = 366)) :
                      (days_since_1_1_1 dt (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d) % 146097 - days_since_1_1_1 dt (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d) % 146097 / 36524 * 36524) % 1461 = d' dt
                      theorem Verify.OrdinalDate.d'_lt_1460_eq (dt : Time.OrdinalDate) (hlt : d' dt < 1460) :
                      ¬(dt.year % 4 = 0 (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d).val = 366)
                      theorem Verify.OrdinalDate.d'_lt_1460_lt (dt : Time.OrdinalDate) (hlt : d' dt < 1460) :
                      (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d).val < 366
                      theorem Verify.OrdinalDate.d'_lt_1460_eq_year (dt : Time.OrdinalDate) (hlt : d' dt < 1460) :
                      quadcent dt * 400 + cent dt * 100 + quad dt * 4 + d' dt / 365 + 1 = dt.year
                      theorem Verify.OrdinalDate.d'_lt_1460_eq_day_leap {a : Time.Icc 1 366} (dt : Time.OrdinalDate) (h : dt.dayOfYear = Time.DayOfYear.leap a) (hlt : d' dt < 1460) :
                      (d' dt % 365 + 1).toNat = (match dt.dayOfYear with | Time.DayOfYear.common d => d.val, | Time.DayOfYear.leap d => d).val