Looking for Algorithms Correctness and Efficiency (COMP2038 UNMC) (FML1 23-24) test answers and solutions? Browse our comprehensive collection of verified answers for Algorithms Correctness and Efficiency (COMP2038 UNMC) (FML1 23-24) at moodle.nottingham.ac.uk.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What does the tactic 'trivial' do in Lean?
Observe the following Lean code:
open nat
example : ∀ n : ℕ, 0 ≠ succ n :=
begin
assume n h,
contradiction,
end
Why the code ends up with contradiction to conclude
the steps?
What is the congruence property of equality?
Given that half (succ (succ n)) = succ (half n)
Therefore, half 7 is
I. succ (half 5)II.
succ (half 6)III.
half (succ (succ 5))Observe the following Lean code:
example : (∃ x : A, PP x) → (∀ y : A, PP y → QQ y) → ∃ z : A , QQ z :=
begin
assume p pq,
cases p with a pa,
sorry,
apply pq,
exact pa,
end
Replace sorry with the correct Lean code.What is the special case mentioned in the example related to insertion sort in our lecture slides?
What is the result of m * n
What property does an equivalence relation have?