decidable

How to define a subformula of an inductively defined type in Agda?

强颜欢笑 提交于 2021-01-29 08:11:22
问题 I'm trying to define a simple predicate to determine if a formula is a subformula of a given formal over a simple inductively defined syntax. I'm running into a few, presumably simple, problems. (i) I'd rather use a parameterized module with a given type A. How can one import the information that A is a set, in the sense that A has decideable equality? If this can't be done, what are some workarounds? This is why I have Nat instead. (ii) Is the t1 ≡ (t2 // t3) (and similairly defined)

Proving decidability of subset in Agda

六月ゝ 毕业季﹏ 提交于 2020-04-30 02:37:33
问题 Suppose I have this definition of Subset in Agda Subset : ∀ {α} → Set α → {ℓ : Level} → Set (α ⊔ suc ℓ) Subset A {ℓ} = A → Set ℓ and I have a set data Q : Set where a : Q b : Q Is it possible to prove that all subset of q is decidable and why? Qs? : (qs : Subset Q {zero}) → Decidable qs Decidable is defined here: -- Membership infix 10 _∈_ _∈_ : ∀ {α ℓ}{A : Set α} → A → Subset A → Set ℓ a ∈ p = p a -- Decidable Decidable : ∀ {α ℓ}{A : Set α} → Subset A {ℓ} → Set (α ⊔ ℓ) Decidable as = ∀ a →

Proving decidability of subset in Agda

假如想象 提交于 2020-04-30 02:35:31
问题 Suppose I have this definition of Subset in Agda Subset : ∀ {α} → Set α → {ℓ : Level} → Set (α ⊔ suc ℓ) Subset A {ℓ} = A → Set ℓ and I have a set data Q : Set where a : Q b : Q Is it possible to prove that all subset of q is decidable and why? Qs? : (qs : Subset Q {zero}) → Decidable qs Decidable is defined here: -- Membership infix 10 _∈_ _∈_ : ∀ {α ℓ}{A : Set α} → A → Subset A → Set ℓ a ∈ p = p a -- Decidable Decidable : ∀ {α ℓ}{A : Set α} → Subset A {ℓ} → Set (α ⊔ ℓ) Decidable as = ∀ a →

haskell : making a superclass of Num

杀马特。学长 韩版系。学妹 提交于 2020-01-03 11:00:35
问题 I want to make a superclass of Num, called Linear class Linear a where add :: a -> a -> a instance (Num a) => Linear a where add = (+) I get the error : Illegal instance declaration for `Linear a' (All instance types must be of the form (T a1 ... an) where a1 ... an are *distinct type variables*, and each type variable appears at most once in the instance head. Use -XFlexibleInstances if you want to disable this.) In the instance declaration for `Linear a' From what I understand, something

L = {T | T is a turing machine that recognizes {00, 01}} Prove L is undecidable

岁酱吖の 提交于 2019-12-12 04:44:37
问题 L = {<T> | T is a turing machine that recognizes {00, 01}} Prove L is undecidable. I am really having difficulties even understanding the reduction to use here. I'm not asking for free lunch, just a push in the right direction. 回答1: A direct application of Rice's theorem will let you prove this without doing any work at all. Some Turing machines recognize {00, 01}. Some don't. The difference is semantic in that it has to do with the strings accepted, not the structure of the automaton. Hence,

Exactly what quantifiers is SMT complete for?

北城余情 提交于 2019-12-10 14:57:06
问题 I've been looking at various SMT solvers, mainly Z3, CVC4, and VeriT. They all have vague descriptions of their ability to solve SMT problems with quantifiers. Their documentation is primarily example based (Z3), or consists of academic papers, describing possible changes that may or may not actually be implemented. I know that there are decidable fragments of First-order logic, such as: Finitely-bounded quantifiers Monadic first-order logic What I'd like to know is, which (if any) classes of

Relationship between NP-hard and undecidable problems

折月煮酒 提交于 2019-12-09 08:33:39
问题 Am a bit confused about the relationship between undecidable problems and NP hard problems. Whether NP hard problems are a subset of undecidable problems, or are they just the same and equal, or is it that they are not comparable? For me, I have been arguing with my friends that undecidable problems are a superset to the NP hard problems. There would exist some problems that are not in NP hard but are undecidable. But i am finding this argument to be weak and am confused a bit. Are there NP

Generating run time proofs with type predicates in Idris

狂风中的少年 提交于 2019-12-06 23:05:22
问题 I am using this type to reason about strings on which decidable parsing can be performed: data Every : (a -> Type) -> List a -> Type where Nil : {P : a -> Type} -> Every P [] (::) : {P : a -> Type} -> P x -> Every P xs -> Every P (x::xs) For example, defining the digits [0-9] like this: data Digit : Char -> Type where Zero : Digit '0' One : Digit '1' Two : Digit '2' Three : Digit '3' Four : Digit '4' Five : Digit '5' Six : Digit '6' Seven : Digit '7' Eight : Digit '8' Nine : Digit '9'

Relationship between NP-hard and undecidable problems

a 夏天 提交于 2019-12-03 11:59:51
Am a bit confused about the relationship between undecidable problems and NP hard problems. Whether NP hard problems are a subset of undecidable problems, or are they just the same and equal, or is it that they are not comparable? For me, I have been arguing with my friends that undecidable problems are a superset to the NP hard problems. There would exist some problems that are not in NP hard but are undecidable. But i am finding this argument to be weak and am confused a bit. Are there NP-complete problems that are undecidable.? is there any problem in NP hard which is decidable.?? Some