roseking's picture
Add lean source and binary files (part 91)
caec230 verified
Raw History Blame Contribute Delete
1.96 kB
11
@[simp] theorem point_time (t : ℝ) (x : Space) : point t x 0 = t := rfl
13
@[simp] theorem position_point (t : ℝ) (x : Space) : position (point t x) = x := by
proof · 2 lines
  ext i
  fin_cases i <;> rfl
17
theorem assemble_during_loading (template : Machine → Field)
    (loading : Machine → List ℕ → Field) (M : Machine) (w : List ℕ)
    (t : ℝ) (x : Space) (ht : t < 1) :
    assemble template loading M w (point t x) = loading M w (point t x) := by
proof · 2 lines
  simp only [assemble, point_time]
  exact ite_eq_left ht
24
theorem assemble_after_loading (template : Machine → Field)
    (loading : Machine → List ℕ → Field) (M : Machine) (w : List ℕ)
    (t : ℝ) (x : Space) (ht : 1 ≤ t) :
    assemble template loading M w (point t x) = template M (point (Int.fract t) x) := by
proof · 1 line
  simp only [assemble, point_time, ite_eq_right (not_lt_of_ge ht), position_point]
30
theorem assemble_period_one (template : Machine → Field)
    (loading : Machine → List ℕ → Field) (M : Machine) (w : List ℕ)
    (t : ℝ) (ht : 1 ≤ t) (x : Space) :
    assemble template loading M w (point (t + 1) x) =
      assemble template loading M w (point t x) := by
proof · 2 lines
  rw [assemble_after_loading template loading M w (t + 1) x (by linarith),
    assemble_after_loading template loading M w t x ht, Int.fract_add_one]
38
theorem assemble_input_only_in_loading (template : Machine → Field)
    (loading : Machine → List ℕ → Field) (M : Machine) (v w : List ℕ)
    (t : ℝ) (ht : 1 ≤ t) (x : Space) :
    assemble template loading M v (point t x) = assemble template loading M w (point t x) := by
proof · 2 lines
  rw [assemble_after_loading template loading M v t x ht,
    assemble_after_loading template loading M w t x ht]