File size: 1,069 Bytes
f4b3ad1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import OAI.NumberTheory.Ostmann.Arithmetic.AtomIntervalRanges
namespace OAI
/-! # The original interval guards have bounded complexity at every finite depth -/
namespace Ostmann
open scoped Classical
theorem atomIntervalRanges_singleton {I : Type*} [Fintype I]
(role : I → CopyScheduleRole) (lo hi : I → ℕ) (n : ℕ)
(r : ScheduleAtomRange role n) (hr : r ∈ atomIntervalRanges role lo hi n) :
r.atoms.length = 1 := by
obtain ⟨v, _, rfl⟩ := List.mem_map.mp hr
rfl
theorem atomIntervalRanges_length_le {I : Type*} [Fintype I]
(role : I → CopyScheduleRole) (lo hi : I → ℕ) (k n : ℕ) (hn : n ≤ k) :
(atomIntervalRanges role lo hi n).length ≤ 3 ^ k * Fintype.card I := by
have he : (atomIntervalRanges role lo hi n).length = Fintype.card (CopyScheduleAtoms role n) := by
simp only [atomIntervalRanges, List.length_map, Finset.length_toList, Finset.card_univ]
rw [he]
exact (copyScheduleAtoms_card_le role n).trans
(Nat.mul_le_mul_right _ (Nat.pow_le_pow_right (by omega : 1 ≤ 3) hn))
end Ostmann
end OAI
|