{-# OPTIONS --no-termination-check #-}
module J-Shift-Selection where
open import Logic
open import LogicalFacts
open import Naturals
open import JK-Monads
open import Finite-JK-Shifts
J-∀-shift-selection : {R : Ω} {A : ℕ → Ω} →
(∀(n : ℕ) → J {R} (A n)) → J {R} (∀(n : ℕ) → A n)
J-∀-shift-selection εs =
J-∧-shift'(∧-intro (head εs) (J-∀-shift-selection(tail εs)))
prod : {R : Ω} {A : ℕ → Ω} →
(∀ (n : ℕ) → J {R} (A n)) → J {R} (∀ (n : ℕ) → A n)
prod {R} {A} εs p = cons (∧-intro a₀ ((prod {R} (tail εs)) (prefix a₀ p)))
where a₀ : A O
a₀ = head εs (λ a → prefix a p ((prod {R} (tail εs))(prefix a p)))