Source/Packages

Compiler.DependentCore

packages/compiler/src/Compiler/DependentCore.alpha

12,943 lines498 declarations489.0 KiBSHA-256 ef207b0de796

def · lines 2291–2306

substituteCorePart1

Full file
Part of `substituteCore`, lifted out to keep it inside the §28.3 size and nesting limits; the parameters are the locals it still needs.
2291def substituteCorePart1 =
2292  (lambda unrestricted index : Nat .
2293    (lambda unrestricted depth : Nat .
2294      (lambda unrestricted replacement : (family CoreTerm) .
2295        (nat-eliminate
2296          (lambda unrestricted equalCondition : Nat . (family CoreTerm))
2297          (nat-eliminate
2298            (lambda unrestricted greaterCondition : Nat . (family CoreTerm))
2299            (constructor CoreTerm CoreBound index)
2300            (lambda unrestricted predecessor : Nat .
2301              (lambda unrestricted induction : (family CoreTerm) .
2302                (constructor CoreTerm CoreBound (naturalPredecessor index))))
2303            (nat-less-than depth index))
2304          (lambda unrestricted predecessor : Nat .
2305            (lambda unrestricted induction : (family CoreTerm) . (shiftCore replacement zero depth)))
2306          (naturalEqual index depth)))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.