open import Chapter2.IDesc

open import Chapter5.Ornament

module Chapter6.Lift.Induction
         {I I⁺ : Set}
         {D : func I I}
         {u : I⁺  I}
         (o : orn D u u)
       where

open import Data.Product

open import Chapter1.Logic 

open import Chapter2.IDesc.Induction

open import Chapter5.Reornament o

open import Chapter6.Functions
open import Chapter6.FunOrnament
open import Chapter6.Patch


DAlgLift : ∀{T}  DAlg D  _   T ⟧Type)  FunctionOrn T  Set
DAlgLift α T⁺ = DAlg reornD ((λ {ix} _  Patch (induction D _ α (proj₂ ix)) T⁺))

liftInd : {i : I}{i⁺ : u ⁻¹ i}
          {T : Type}{T⁺ : FunctionOrn T}
          (α : DAlg D  _   T ⟧Type))
          (β : DAlgLift α T⁺) 
    Patch (induction D  _   T ⟧Type) α)
          (μ⁺ o [ i⁺ ]→ T⁺)
liftInd {i⁺ = inv i⁺} α β = 
  λ x x⁺⁺  induction reornD _  {ix}  β {ix}) x⁺⁺