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.
Questions tagged [proof]
828 questions
3
votes
3 answers
Weird proof obligations resulting from a push/pop evaluator in Coq
I'm trying to define a simple stack-based language in Coq. For now, the instruction set contains push which pushes a nat, and an instruction pop which pops one. The idea is that programs are dependently typed; Prog 2 is a program which leaves two…
user1544337
3
votes
1 answer
Unable to verify assign clause - Frama-C
In my example below, frama-c isn't able to prove my assign clause in the function contract and I am not sure why. I would really appreciate any help.
/*@
@ requires n>0;
@ requires \valid(a+(0..n-1));
@ ensures \forall int i; (n>i>=0 ==>…

the_martian
- 632
- 1
- 9
- 21
3
votes
1 answer
Proof of CRC Burst Error Detection Checksum Result
It is said that a CRC (Cyclic Redundancy Checksum) can detect burst errors of fewer than r + 1 bits, where r is the degree of the polynomial. Furthermore, a burst of length greater than r + 1 bits is detected with probability 1 – 2-r.
Can someone…

anuja
- 170
- 1
- 2
- 11
3
votes
1 answer
Additional pattern matching on the second argument in `plus` for `Nat` type
I found out that plus function for Nats is implemented in this way
total plus : (n, m : Nat) -> Nat
plus Z right = right
plus (S left) right = S (plus left right)
I wonder if there is particular reason not to pattern match on the second…

vrom911
- 694
- 1
- 5
- 16
3
votes
1 answer
Show that if the depth first search tree of G equals breadth first search tree of G then G is Tree
Please tell me if my proof is correct or not
We have a connected graph, and specific vertex u in V(G).
Suppose we compute the dfs tree of G rooted at u and obtain tree T.
Now imagine we compute the bfs tree of G rooted at u and we obtain the…

Mathyew D McGlaweflin
- 55
- 1
- 5
3
votes
0 answers
Proof of associativity law for type-level set
I'm trying to prove that type-level function Union is associative, but I'm not sure how it should be done. I proved right identity and associativity laws for type-level append function and right identity for union:
data SList (i :: [k]) where
SNil…

starper
- 175
- 1
- 8
3
votes
1 answer
Keeping track of "state" when writing equality proofs that are long chains of transitively linked steps
I was writing the following proof in Idris:
n : Nat
n = S (k + k)
lemma: n * n = ((k * n) + k) + (1 + (((k * n) + k) + 0))
lemma = sym $
rewrite plusZeroRightNeutral ((k * n) + k) in
rewrite plusAssociative ((k * n) + k) 1 ((k * n)…

Cactus
- 27,075
- 9
- 69
- 149
3
votes
1 answer
Rendering PDF proofs with Java (via LaTex?)
Currently I am working on a automated theorem prover in Java.
I would like to be able to render these proofs, as PDF.
Preferrably, this will go though something like LaTeX, using proof.sty or qtree.sty.
However, I've read that rendering LaTeX code…

wen
- 3,782
- 9
- 34
- 54
3
votes
1 answer
How to define arbitrary partial order relation and prove its properties?
I have a simple data type with all nullary constructors and wish to define a partial order for it, including a Relation.Binary.IsPartialOrder _≡_.
My use case: the type is the type of sorts in an abstract syntax tree (statement, expression, literal,…

M Farkas-Dyck
- 646
- 4
- 14
3
votes
1 answer
Agda: Vector Membership in Stdlib? (And how to learn stdlib in general)
I'm dealing with strings in Agda, and I've got a vector of them. I need to check if a given string occurs in a vector (as a part of checking if a variable is free or bound in an expression, in PL theory wprk I'm doing).
I'm still finding my way…

jmite
- 8,171
- 6
- 40
- 81
3
votes
1 answer
Proof that a unique BST can be reconstructed from a preorder (or a postorder) traversal unambiguously
For a Binary SEARCH Tree, a preorder or a postorder traversal is sufficient to reconstruct its original binary search tree unambigiously.
But I cannot find a proof or a explanation for why it is so.
For inorder traversal, it is trivial to come up…

SHH
- 3,226
- 1
- 28
- 41
3
votes
1 answer
How to show that union and intersection of min cuts in flow network is also a min cut
The proof of this is everywhere skipped and said to be corollary of Min-Cut-Max-Flow theorem ... It's usually something like:
Let S1 and S2 be minimum cuts of a flow network. Then S1∪S1 and S1∩S2 are also min cuts.
Can anyone tell me how exactly…

wannabe programmer
- 653
- 1
- 9
- 23
3
votes
1 answer
Dafny - Substring implementation
Im trying to write a simple verified implementation of the substring method.
My method accepts 2 strings and checks whether str2 is in str1.
Im trying to figure out firstly why my invairant doesnt hold - Dafny marks that the invariant might not hold…

vito
- 323
- 1
- 10
3
votes
1 answer
What does cpython do to help detect object cycles(reference counting)?
From what I've read about cpython it seems like it does reference counting + something extra to detect/free objects pointing to each other.(Correct me if I'm wrong). Could someone explain the something extra? Also does this guarantee* no cycle…

Roman A. Taycher
- 18,619
- 19
- 86
- 141
3
votes
1 answer
Idempotents of a commutatitive ring in Lean proof assistant
Hi I am trying to do some mathematics in the Lean proof assistant to see how it works. I decided that it should be fun to play with idempotents of a commutative ring. Here's what I tried:
variables (A : Type) (R : comm_ring A)
definition KR : Type…

Jonathan Gallagher
- 2,115
- 2
- 17
- 31