QuantumComputinglib learn · inspect · formalize
Checked on this commit 4,524 public declarations commit 4e2c5b2c0be5 Build record

State Preparation / Structured Preparation

Structured Preparation

Exercise SP-118

intermediate · counterexample · train

nl bridge from inspected source. Current content-bound mathematical second pass accepted. No new Lean verification is claimed for this NL view.

Assumptions and conventions

      Question

      A gluing principle states: if two real functions f and g are each C^k and all their derivatives through order k agree at a cut point c, then the spliced function (equal to f for x < c and g for x >= c) is C^k. A student claims the jet-matching hypothesis is unnecessary — that merely requiring f and g to be C^k and to agree in value at c (f(c) = g(c)) already gives a C^k splice. Disprove this for k = 1 with an explicit example, and explain exactly which derivative order fails and why the full jet-matching hypothesis through order k is needed for a C^k conclusion.

      Hint: mathematical route

      C^k gluing of two pieces needs derivative agreement at every order through k, not just value matching; ReLU (f=0, g=x) matches values yet fails C^1 at the cut.

      1. With only value agreement, the splice (ReLU) is continuous but has unequal one-sided first derivatives at the cut.
      2. Hence it fails to be C^1, disproving the weakened claim; C^1 additionally requires f'(c)=g'(c).
      3. The correct C^k gluing is proved by induction consuming one jet-matching equation per order, so all orders 0..k are needed.
      Reference solution

      Counterexample at k = 1, cut c = 0. Take f(x) = 0 and g(x) = x. Both are C^1 (indeed C^infinity), and they agree in value at 0: f(0) = 0 = g(0). The splice is h(x) = 0 for x < 0 and h(x) = x for x >= 0, which is exactly the ReLU function (max(x,0)). Step 1 (continuity holds): h is continuous because the one value-matching condition f(0) = g(0) is satisfied; so h is C^0. Step 2 (first derivative fails): the left derivative of h at 0 is f'(0) = 0, while the right derivative is g'(0) = 1. Since 0 != 1, h is not differentiable at 0, hence not C^1. The student's weakened hypothesis (value agreement only) is therefore insufficient: it controls order 0 but leaves the order-1 jets mismatched. Step 3 (what the real principle needs): to obtain C^1 we must also require f'(0) = g'(0); more generally for C^k we need iterated-derivative agreement at every order j = 0,1,...,k. The proof of the correct principle is by induction on k: the base case uses continuity from value matching; the inductive step differentiates the splice, which is itself a splice of f' and g' (using that the one-sided derivatives coincide precisely because f'(c)=g'(c)), and then applies the hypothesis one order lower. Each induction level consumes exactly one jet-matching equation, so all k+1 equations j = 0,...,k are genuinely used. Dropping any of them breaks the chain at that order, exactly as the ReLU example breaks at order 1. Hence the jet-matching hypothesis through order k is necessary, not decorative, and value agreement alone yields only continuity.

      Assessment rubric
      1. Gives an explicit k=1 example (f=0, g=x, i.e. ReLU) with f(0)=g(0) but mismatched first derivatives. (1 weight)
      2. Shows the splice is continuous (value match) but not differentiable at 0 because left derivative 0 != right derivative 1. (1 weight)
      3. States the correct hypothesis needs derivative agreement at every order j=0..k, not just the value. (1 weight)
      4. Explains the inductive proof consumes one jet-matching equation per order, so each of the k+1 equations is genuinely used. (1 weight)

      Graph-grounded prerequisites

      These are support/source anchors, not an automatically extracted theorem-dependency proof.

      Download the shared core registry

      Lean view and evidence boundary

      No aligned Lean view has been admitted for this native core in this textbook checkpoint. This is not a claim that the underlying mathematics lacks a formal proof. Contributions must preserve this exact target contract and split.

      Read the Lean track and existing diagnostic warmups

      Sources and provenance
      • QuantumBlockEncoding/HermiteSmoothness.lean

        lines 56-90: deriv_splice needs hv : f c = g c and hd : deriv f c = deriv g c; contDiff_splice (k c f g) (hf hg : ContDiff k) (hjet : forall j <= k, iteratedDeriv j f c = iteratedDeriv j g c) : ContDiff k (splice c f g); proof by induction on k, base uses value match for continuity, succ step differentiates and recurses with jets one order lower

        Source SHA-256: da47568584b8435a07431a7ebae29836796018f76d02b4d8b0c4169830ec68bc · MIT (repository LICENSE)

      Contract: ed00a663173b7e87f3dbf8df6ea357b4e9d304db81249f3b31493f6ac9ace026

      Item digest: 27638bfef87bf0b5f1fc109c2d14d973d255199199bfe386b9d7b6b53453ccdf

      Graph snapshot: qcb-snapshot-ffa644f0da3031a1ce754b9a

      Authored support steps: 3. This is not measured graph distance or model difficulty.