In natural deduction, conjunction introduction combines derivations of and under the available assumptions into . Disjunction elimination takes and two subproofs of the same conclusion , one assuming and the other assuming , and concludes . Implication introduction takes a subproof deriving from a temporary assumption , and concludes .
The rectangular boxes mark the scopes of temporary assumptions. The disjunction elimination rule discharges its two case assumptions, while the implication introduction rule discharges the antecedent assumption. Other surrounding assumptions remain in force; intermediate results depending on the boxed assumptions cannot be exported arbitrarily. Schematically,
Here the square brackets designate the assumptions discharged by the corresponding inference rule.
Choose fresh arbitrary eigenvariables . Under , use the equality elimination rule to transport to . For the reverse direction, first derive by the symmetry derivation above. In full natural deduction form:
All temporary assumptions are discharged before either universal quantifier introduction rule application, so both eigenvariable conditions hold. No premises remain:
For transitivity of first-order equality, take to be . The equality elimination rule applied to and gives
For symmetry of first-order equality, first obtain by the equality introduction rule. Now take to be and substitute using :
These choices of formula show exactly which occurrence is replaced, so neither argument assumes the property it is establishing.
The equality introduction rule is reflexivity, with no premise. The equality elimination rule is substitution of equal first-order terms into a first-order formula:
The indicated substitution must be capture-avoiding substitution in first-order logic: the first-order terms must be free for the replaced variable. One can designate a particular argument occurrence by choosing appropriately; the rule does not demand replacing every occurrence of an identical-looking term in a formula.
The dot after gives it scope over the following implication: read the premise as . Choose a fresh arbitrary eigenvariable . A natural deduction proof is
At line 6, is free in no undischarged assumption, so the universal quantifier introduction rule is valid.
The proposed variant is not derivable in a sound first-order logic. For a countermodel, use the two-element domain , interpret both predicates as , and assign the free variable the value 0. Then is true, as is under the assignment, but is false at element 1. The premise's bound and the conclusion's free have different scopes.
Attempting to generalize from in the variant would violate the eigenvariable condition, because remains free in the undischarged assumption .
Apply the negation introduction rule to an assumed existential statement and the existential quantifier elimination rule with a fresh witness :
The eigenvariable condition holds: is absent from the surrounding premise, the existential assumption and the exported conclusion . Its local assumption is discharged before the final negation introduction rule.
First obtain by a double-negation elimination, then obtain by the negation introduction rule. The following natural deduction proof uses only the printed rules, with denoting the logical falsity elimination rule:
Reiteration only reuses an available line within its scope. In particular, the unused temporary assumption on line 11 is legitimately discharged by the implication introduction rule.
Put and . Use the printed implication elimination rule, negation elimination rule, negation introduction rule, double-negation elimination and implication introduction rule:
Line 1 is the given premise; the argument actually establishes the conclusion without needing it, since line 2 supplies its own copy of . Introducing and discharging this separate temporary assumption preserves the exact printed conclusion.
Execute this MIPS instruction fragment twice, once with equal operands and once with unequal operands, and observe whether its conditional branch is taken:
beq $t0, $t1, hit
sll $zero, $zero, 0
sll $zero, $zero, 0
hit:
sll $zero, $zero, 0
Use $t0=7,$t1=7 for the first test and $t0=7,$t1=8 for the second. All padding instructions are explicit harmless MIPS instructions. In the pictured single-cycle model, the next program counter after beq is either hit or the sequential address. The branch target is deliberately different from the next sequential instruction. The extra padding also keeps a branch delay slot harmless if a test fixture uses an implementation with one, although the pictured model itself has none.
A healthy zero line reports the first subtraction as zero and the second as nonzero. A line stuck at zero prevents both branches, while a line stuck at one forces both branches. Therefore
Observe the branch decision or execution trace itself; an alleged unconditional beq used to skip result-recording code would also be affected by the fault.
Again use independent externally initialized MIPS instruction tests. First preset $t0=7, $t1=5, and execute
add $t2, $t0, $t1
The normal result, also obtained with ALUSrc stuck at zero, is 12. If the line is stuck at one, the second ALU operand is the sign-extended low 16 instruction bits. For this exact instruction they encode rd=10, shift amount zero and function , giving . The erroneous result is therefore .
For the second test, preset $s0=L, $t3=4, memory at to 37 and memory at to 99, with both words valid and aligned. Execute
lw $t3, 0($s0)
Normally, and with ALUSrc stuck at one, the address is and the result is 37. With the line stuck at zero, the second ALU operand is the old $t3=4, so the load reads 99 from . Thus
A writing MIPS instruction distinguishes a line stuck at zero. With $t0=7, $t1=5, $t2=99, execute
add $t2, $t0, $t1
A healthy line or a line stuck at one produces $t2=12; a line stuck at zero leaves $t2=99.
To distinguish normal operation from stuck at one, execute a normally nonwriting MIPS instruction. The following functional test uses the usual concrete controller choice MemToReg=0 during sw, selecting the ALU result on the write-data bus. Prepare $t0=37 and $s0=L-16384, for an aligned writable address , then execute
sw $t0, 16384($s0)
The ALU computes . Here rt is register 8 ($t0), and immediate also puts 8 into bits . Thus either value of the otherwise irrelevant RegDst selects $t0. With a healthy RegWrite, $t0 remains 37. With RegWrite stuck at one and the specified write-data selection, the unwanted register file write changes $t0 to . Combining the two independent observations gives
Controller qualification. The source diagram does not specify values of otherwise irrelevant control outputs during a store. MemToReg is a don't-care condition when RegWrite=0; its chosen implementation matters when that enable line is faulty. The functional test above explicitly fixes this convention instead of assuming that all implementations resolve it identically. A manufacturing fixture can also observe the register file write-enable directly while executing add followed by sw: the expected pairs are normally, stuck at zero, and stuck at one. This second observation does not depend on unused write-data controls or on whether an unwanted write happens to repeat an old value.
Run the following two MIPS instruction tests separately from externally prepared states, and inspect the register file after the indicated instruction. External preparation is useful in a manufacturing test: code that initializes processor registers through the very control line being tested need not work. Assume the one potentially faulty line is RegDst; all other lines work normally.
For the first test, preset $t0=7, $t1=5, $t2=99, and execute
add $t2, $t0, $t1
The encoded rt is $t1, while rd is $t2. A healthy line or a line stuck at one writes 12 into $t2. A line stuck at zero instead writes 12 into $t1, leaving $t2=99.
For the second test, preset $t3=4, $s0=L, and the aligned memory word at to 37, then execute
lw $t3, 0($s0)
The zero immediate makes instruction bits zero. A healthy line or a line stuck at zero writes 37 into $t3; a line stuck at one attempts to write the MIPS zero register, leaving $t3=4. The MIPS zero register ignores attempted writes. Thus, recording the first test's $t2 and the second test's $t3,
There are candidate values in and exactly occurrences there. If , then
Thus the pigeonhole principle gives
This conclusion does not assert that every value on the lower side is present; duplicates may leave both sides deficient.
Take an integer pivot . There are possible values in but only occurrences of such values in the whole array. When , the pigeonhole principle gives
Repeated values do not invalidate the argument: they can only reduce the number of distinct values represented by those occurrences. The other side might also contain a missing value.
A list unfold needs an explicit state describing the unvisited work. Use a list of pending rose trees, with the next tree first. Emit that tree's root label, and replace it by its children followed by the remaining pending trees:
dftU :: RTree a -> [a]
dftU t = unfold null label advance [t]
  where
    label :: [RTree a] -> a
    label (Node x _ : _) = x

    advance :: [RTree a] -> [RTree a]
    advance (Node _ children : rest) = children ++ rest
The boxed state transition is , with output . The stopping test prevents either helper from being applied to [].
The loop invariant is that concatenating the depth-first traversals of the pending trees gives exactly the unproduced output. Removing the next root emits its first label; replacing that tree by its children preserves the remainder of that preorder traversal. Adding children at the front realizes an explicit-stack depth-first tree traversal; placing them at the end would give a different visiting order. The first states for the source example have roots [1], [2,5,6], [3,4,5,6], [4,5,6], [5,6], [6], [7], [].
The child results supplied by the tree fold are already their depth-first traversals. Prepend the current label to their list concatenation:
dftF :: RTree a -> [a]
dftF = foldRTree visit
  where
    visit :: a -> [[a]] -> [a]
    visit x childLists = x : concat childLists
Thus . Substituting the equation for the tree fold gives exactly the recursive preorder traversal equation from part (i), proving equality by structural induction on a finite rose tree.
Emit the root label, then concatenate the depth-first traversals of the child rose trees in order:
dft :: RTree a -> [a]
dft (Node x ts) = x : concatMap dft ts
This is preorder traversal:
The Haskell concatMap function preserves child order and finishes each child subtree before moving to the next. A leaf yields its singleton label; the source example yields [1,2,3,4,5,6,7].
Let be the head indicator random variable for toss . These are independent and identically distributed random variables with a Bernoulli distribution of parameter , so , , and . Taking makes . The preceding Chebyshev's inequality bound gives
The endpoints are included because this event is exactly .
By linearity of expectation and independence,
For , apply Chebyshev's inequality at threshold and take the complementary event:
If , every almost surely, so almost surely and the bound holds directly. This handles the zero-threshold case without applying Chebyshev's inequality at an inadmissible threshold.
The logarithm is strictly increasing, so . Since almost surely,
Thus the logarithm of a Pareto random variable has an exponential distribution with rate . Its probability density function value at the single endpoint can be chosen arbitrarily without changing the law.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact