Questions tagged [proof]

A mathematical proof is any mathematical argument which demonstrates the truth of a mathematical statement. Informal proofs are typically rendered in natural language and are held true by consensus; formal proofs are typically rendered symbolically and can be checked mechanically. "Proofs" can be valid or invalid; only the former kind constitutes actual proof, whereas the latter kind usually refers to a flawed attempt at proof.

828 questions
3
votes
0 answers

A Paradox in graph theory?

I was reading minimum spanning trees in CLRS and came across the following corollary which is basis of algorithms to compute minimum spanning tree: Corollary 23.2 Let G = (V,E) be a connected, undirected graph with a real-valued weight function w…
user4952610
3
votes
2 answers

Proof: Check if two integer arrays are permutations of each other using linear time and constant space

I was interested in creating a simple array problem with running time and space constraints. It seems that I have found a solution to my problem. Please read the initial description comment of the problem in the following java code: /* * Problem:…
3
votes
1 answer

Prove that f(n) = Θ(g(n)) iff g(n) = Θ(f(n))

I have been given the problem: f(n) are asymptotically positive functions. Prove f(n) = Θ(g(n)) iff g(n) = Θ(f(n)). Everything I have found points to this statement being invalid. For example an answer I've come across states: f(n) = O(g(n))…
user3068177
  • 357
  • 2
  • 5
  • 17
3
votes
2 answers

Proof with false hypothesis in Isabelle/HOL Isar

I am trying to prove a lemma which in a certain part has a false hypothesis. In Coq I used to write "congruence" and it would get rid of the goal. However, I am not sure how to proceed in Isabelle Isar. I am trying to prove a lemma about my le…
Martin Copes
  • 931
  • 1
  • 7
  • 14
3
votes
2 answers

Not equal succesors in Coq

I am trying to prove the following lemma in Coq: Lemma not_eq_S2: forall m n, S m <> S n -> m <> n. It seems easy but I do not find how to finish the proof. Can anybody help me please? Thank you.
Martin Copes
  • 931
  • 1
  • 7
  • 14
3
votes
1 answer

Prove Logical Operations Using Inference Rules

Premise 1: p ∧ q Premise 2: q → r Premise 3: s → ¬r Premise 4: ¬r → ¬u Premise 5: t ∨ s Premise 6: t → ¬p ∨ U Prove: u ∧ q Does anybody know how to solve this proof using rules of inference? I know the rules of inference like modus ponens/tollens…
user4780686
3
votes
1 answer

Prove that one hypothesis is negation of another in Coq

For example I have these two hypotheses (one is negation of other) H : forall e : R, e > 0 -> exists p : X, B e x p -> ~ F p H0 : exists e : R, e > 0 -> forall p : X, B e x p -> F p And goal False How to prove it?
3
votes
1 answer

Termination implies existence of normal form

I would like to prove that termination implies existence of normal form. These are my definitions: Section Forms. Require Import Classical_Prop. Require Import Classical_Pred_Type. Context {A : Type} Variable R : A -> A -> Prop. …
N F
  • 37
  • 4
3
votes
1 answer

Seeming contradiction typechecks in Idris

I have the following definition of a predicate on vectors that identifies if one is a set (has no repeated elements) or not. I define membership with a type-level boolean: import Data.Vect %default total data ElemBool : Eq t => t -> Vect n t ->…
gonzaw
  • 771
  • 4
  • 17
3
votes
1 answer

Proving identity for binary operator on Fin

I've defined an operator, +- (ignore the terrible name), as follows: infixr 10 +- (+-) : Fin (S n) -> Fin (S m) -> Fin (S (n + m)) (+-) {n} {m} FZ f' = rewrite plusCommutative n m in weakenN n f' (+-) {n = S n} (FS f) f' = FS (f +- f') The…
j11c
  • 100
  • 7
3
votes
1 answer

Proving to Agda that we're talking about the same thing

I'm trying to prove a contradiction, but I run into an issue trying to prove to Agda that the sigma domain type returned by the <>-wt-inv is the same sigma as seen earlier in the proof. I expect that the uniq-type proof should help me there, but I…
A.J.Rouvoet
  • 1,203
  • 1
  • 14
  • 29
3
votes
1 answer

How do you prove probabilities are closed under multiplication with dependent types?

I'm working a bit with Idris and I've written a type for probabilities - Floats between 0.0 and 1.0: data Probability : Type where MkProbability : (x : Float) -> ((x >= 0.0) && (x <= 1.0) = True) -> Probability I want to be able to multiply…
Jack
  • 2,223
  • 13
  • 23
3
votes
2 answers

Idris proof by definition

I can write the function powApply : Nat -> (a -> a) -> a -> a powApply Z f = id powApply (S k) f = f . powApply k f and prove trivially: powApplyZero : (f : _) -> (x : _) -> powApp Z f x = x powApplyZero f x = Refl So far, so good. Now, I try to…
mudri
  • 758
  • 3
  • 16
3
votes
1 answer

How to prove that Greedy approaches will not work

For any given problem where greedy approaches will not give optimal value, we can find a counter example to disprove that approach. However, is it possible to prove that for a given problem, any greedy approach in general will not work.
Shamim Hafiz - MSFT
  • 21,454
  • 43
  • 116
  • 176
3
votes
1 answer

Proof of code execution

Is there a way to prove, I mean technically and legally prove, that a piece of code has been ran at a certain time on a computer ? I think this could be achieved by involving cryptographic techniques like checksums and trusted timestamps, what do…
Silas
  • 813
  • 1
  • 10
  • 18