In the "Typing rules" section of the coq reference manual, a note says "We may have :=: well-typed without having ((λ:. ) ) well-typed (where is a type of ). This is because the value associated with may be used in a conversion rule (see Section Conversion rules)."
Why the `Let-in` construct cannot be defined as a derived form in a dependently-typed language?
70 views Asked by yiyuan-cao At
1
There are 1 answers
Related Questions in COQ
- Coq : mutually recursive definitions with [mrec] in InteractionTrees Library
- Is there a function that returns a list of values with specific type in OCaml?
- How to prove (X !-> 3) =[ <{ X := X + 2 }> ]=> (X !-> 5)?
- Showing polynomial equality in coq/ssreflect
- Syntax of the case tactic in coq
- Why assuming singleton elimination and definitional proof irrelevance leads to UIP, in Coq?
- Understanding nat_ind2 in Logical Foundations
- What `dependent induction` tactic does in Coq and how to use it
- Split multiple conjuncts in the goal
- Coq can't define an inductive proposition
- Coq Decreasing Argument mapping
- The `specialize` tatic in Coq does not work well with typeclasses?
- Multiple Assignements in a Coq Map to the same value
- Decider for lists In Fixpoint
- VSCoq Error: Connection to server got closed. Server will not be restarted
Related Questions in DEPENDENT-TYPE
- Notation for functions returning dependent types
- how to create a type that contains an array of a specific length, in F#
- Could TypeScript model this function if it had dependent types?
- Dependent equality with 2 different type functions
- How can I prove dependent function types equal in Agda?
- In Scala 3, should 2 dependent types that depends on 2 equal & singleton objects perceived to be equal? Why or why not?
- How do I efficiently add existentially typed safe money values?
- Why can some disjoint and exhaustive patterns not be represented as definitional equalities?
- What does the pound sign mean in Idris 2?
- writing a dependent type in agda to guarantee a list is sorted
- In Scala 3 (dotty) or Scala 2, how to make dependent types transitive?
- Updating a dependently typed field without updating what it depends on
- Equality of coinductive types
- How to deal with non-termination error in Cubical Agda
- List without gaps in Coq
Related Questions in TYPE-SYSTEMS
- Understanding “Finding the Dynamic Type in a Generic Context”
- What is the basic type that underlies all other Swift types?
- In Scala 3 (dotty) or Scala 2, how to make dependent types transitive?
- What's the role of unification in Coq's core type system?
- Why the `Let-in` construct cannot be defined as a derived form in a dependently-typed language?
- Swift: Is there still a use case for type erasure since the introduction of primary associated types?
- Kotlin extension function for nullable types ONLY
- What does "w.r.t. " mean in Kotlin?
- Can assert a variable to be an instance of a String in Deno
- In intuitionistic type theory, can any proof written in CoC be rewritten in system λP2? Or, does CoC = λP2?
- In scala3/dotty. Why is it impossible to mix in a type definition with constraint?
- How to implement associated types in Python/Mypy? Or, what to do when wanting sub-classes to have subclass arguments?
- TS check if Type contains 'null' Type
- What is the Haskell equivalence of Rust's associated types?
- Why is char different from *both* signed char and unsigned char?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
There is a reduction rule that replaces a let-bound variable with its definition (this is called delta-reduction in the Conversion Rules section of the manual).
So for example, if you have an expression
let n := 3 in body, and somewhere inbodyyou had an place where an expression of type "vector of length 3" was required, but you wrote an expression of type "vector of length n", then the type checker will automatically unfold the definition ofn. On the other hand, the body of a lambda-expression is type-checked independently, so if you have(fun n => body) 3, then the type checker will leavenunexpanded.Here's a code snippet illustrating the difference: