Step-by-step derivation
S001 · implies
Before
source roles = [gd-one-step]
After
derived = [[point, gradient, step_size, next_point, objective_before, objective_after, nonincreasing, step_scope]]
Conditions: none
List the complete operation/mode field order without JavaScript or answer-shape inference;Boolean,string,null and an unclaimed result remain distinct.
Step identifiers and dependencies
Rule: source_ordered_fields_without_JS · Uses: G001
S002 · calculation
Before
GD ORIGINAL ORIGINAL gradient d*x coordinate0 := mul(3, -2)
After
GD ORIGINAL ORIGINAL gradient d*x coordinate0 = -6
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S001
S003 · calculation
Before
GD ORIGINAL ORIGINAL gradient plus b coordinate0 := sum(-6, -1)
After
GD ORIGINAL ORIGINAL gradient plus b coordinate0 = -7
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S002
S004 · calculation
Before
GD ORIGINAL ORIGINAL gradient d*x coordinate1 := mul(2, 3)
After
GD ORIGINAL ORIGINAL gradient d*x coordinate1 = 6
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S003
S005 · calculation
Before
GD ORIGINAL ORIGINAL gradient plus b coordinate1 := sum(6, -3)
After
GD ORIGINAL ORIGINAL gradient plus b coordinate1 = 3
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S004
S006 · calculation
Before
GD ORIGINAL ORIGINAL objective SQUARE FIRST coordinate0 := mul(-2, -2)
After
GD ORIGINAL ORIGINAL objective SQUARE FIRST coordinate0 = 4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S005
S007 · calculation
Before
GD ORIGINAL ORIGINAL diagonal times square coordinate0 := mul(3, 4)
After
GD ORIGINAL ORIGINAL diagonal times square coordinate0 = 12
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S006
S008 · calculation
Before
GD ORIGINAL ORIGINAL quadratic divide2 coordinate0 := div(12, 2)
After
GD ORIGINAL ORIGINAL quadratic divide2 coordinate0 = 6
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S007
S009 · calculation
Before
GD ORIGINAL ORIGINAL linear product coordinate0 := mul(-1, -2)
After
GD ORIGINAL ORIGINAL linear product coordinate0 = 2
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S008
S010 · calculation
Before
GD ORIGINAL ORIGINAL coordinate objective sum0 := sum(6, 2)
After
GD ORIGINAL ORIGINAL coordinate objective sum0 = 8
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S009
S011 · calculation
Before
GD ORIGINAL ORIGINAL objective running sum0 := sum(0, 8)
After
GD ORIGINAL ORIGINAL objective running sum0 = 8
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S010
S012 · calculation
Before
GD ORIGINAL ORIGINAL objective SQUARE FIRST coordinate1 := mul(3, 3)
After
GD ORIGINAL ORIGINAL objective SQUARE FIRST coordinate1 = 9
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S011
S013 · calculation
Before
GD ORIGINAL ORIGINAL diagonal times square coordinate1 := mul(2, 9)
After
GD ORIGINAL ORIGINAL diagonal times square coordinate1 = 18
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S012
S014 · calculation
Before
GD ORIGINAL ORIGINAL quadratic divide2 coordinate1 := div(18, 2)
After
GD ORIGINAL ORIGINAL quadratic divide2 coordinate1 = 9
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S013
S015 · calculation
Before
GD ORIGINAL ORIGINAL linear product coordinate1 := mul(-3, 3)
After
GD ORIGINAL ORIGINAL linear product coordinate1 = -9
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S014
S016 · calculation
Before
GD ORIGINAL ORIGINAL coordinate objective sum1 := sum(9, -9)
After
GD ORIGINAL ORIGINAL coordinate objective sum1 = 0
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S015
S017 · calculation
Before
GD ORIGINAL ORIGINAL objective running sum1 := sum(8, 0)
After
GD ORIGINAL ORIGINAL objective running sum1 = 8
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S016
S018 · implies
Before
source roles = [GD ORIGINAL, [3, 2], [-1, -3], [-2, 3]]
After
derived = [[3, 2], [-1, -3], [-2, 3], [-7, 3], 8]
Conditions: none
For the WHOLE specified f(x)=1/2 sum d_i x_i²+sum b_i x_i,differentiate each coordinate to d_i x_i+b_i,not2d_i x_i.Compute ALL gradient entries first,then the objective in original order,squaring before multiplying d_i.Qualify positive diagonals,dimensions and coordinate order.
Step identifiers and dependencies
Rule: GD_WHOLE_positive_diagonal_quadratic_ordered_gradient_and_objective · Uses: G001, S017
S019 · calculation
Before
GD ORIGINAL one step ORIGINAL alpha times gradient0 := mul(1/4, -7)
After
GD ORIGINAL one step ORIGINAL alpha times gradient0 = -7/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S018
S020 · calculation
Before
GD ORIGINAL one step ORIGINAL next coordinate0 := sub(-2, -7/4)
After
GD ORIGINAL one step ORIGINAL next coordinate0 = -1/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S019
S021 · calculation
Before
GD ORIGINAL one step ORIGINAL alpha times gradient1 := mul(1/4, 3)
After
GD ORIGINAL one step ORIGINAL alpha times gradient1 = 3/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S020
S022 · calculation
Before
GD ORIGINAL one step ORIGINAL next coordinate1 := sub(3, 3/4)
After
GD ORIGINAL one step ORIGINAL next coordinate1 = 9/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S021
S023 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL gradient d*x coordinate0 := mul(3, -1/4)
After
GD ORIGINAL one step next recomputation ORIGINAL gradient d*x coordinate0 = -3/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S022
S024 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL gradient plus b coordinate0 := sum(-3/4, -1)
After
GD ORIGINAL one step next recomputation ORIGINAL gradient plus b coordinate0 = -7/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S023
S025 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL gradient d*x coordinate1 := mul(2, 9/4)
After
GD ORIGINAL one step next recomputation ORIGINAL gradient d*x coordinate1 = 9/2
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S024
S026 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL gradient plus b coordinate1 := sum(9/2, -3)
After
GD ORIGINAL one step next recomputation ORIGINAL gradient plus b coordinate1 = 3/2
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S025
S027 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL objective SQUARE FIRST coordinate0 := mul(-1/4, -1/4)
After
GD ORIGINAL one step next recomputation ORIGINAL objective SQUARE FIRST coordinate0 = 1/16
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S026
S028 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL diagonal times square coordinate0 := mul(3, 1/16)
After
GD ORIGINAL one step next recomputation ORIGINAL diagonal times square coordinate0 = 3/16
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S027
S029 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL quadratic divide2 coordinate0 := div(3/16, 2)
After
GD ORIGINAL one step next recomputation ORIGINAL quadratic divide2 coordinate0 = 3/32
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S028
S030 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL linear product coordinate0 := mul(-1, -1/4)
After
GD ORIGINAL one step next recomputation ORIGINAL linear product coordinate0 = 1/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S029
S031 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL coordinate objective sum0 := sum(3/32, 1/4)
After
GD ORIGINAL one step next recomputation ORIGINAL coordinate objective sum0 = 11/32
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S030
S032 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL objective running sum0 := sum(0, 11/32)
After
GD ORIGINAL one step next recomputation ORIGINAL objective running sum0 = 11/32
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S031
S033 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL objective SQUARE FIRST coordinate1 := mul(9/4, 9/4)
After
GD ORIGINAL one step next recomputation ORIGINAL objective SQUARE FIRST coordinate1 = 81/16
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S032
S034 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL diagonal times square coordinate1 := mul(2, 81/16)
After
GD ORIGINAL one step next recomputation ORIGINAL diagonal times square coordinate1 = 81/8
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S033
S035 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL quadratic divide2 coordinate1 := div(81/8, 2)
After
GD ORIGINAL one step next recomputation ORIGINAL quadratic divide2 coordinate1 = 81/16
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S034
S036 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL linear product coordinate1 := mul(-3, 9/4)
After
GD ORIGINAL one step next recomputation ORIGINAL linear product coordinate1 = -27/4
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S035
S037 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL coordinate objective sum1 := sum(81/16, -27/4)
After
GD ORIGINAL one step next recomputation ORIGINAL coordinate objective sum1 = -27/16
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S036
S038 · calculation
Before
GD ORIGINAL one step next recomputation ORIGINAL objective running sum1 := sum(11/32, -27/16)
After
GD ORIGINAL one step next recomputation ORIGINAL objective running sum1 = -43/32
Conditions: none
Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S037
S039 · implies
Before
source roles = [GD ORIGINAL one step next recomputation, [[3, 1], [2, 1]], [[-1, 1], [-3, 1]], [[-1, 4], [9, 4]]]
After
derived = [[3, 2], [-1, -3], [-1/4, 9/4], [-7/4, 3/2], -43/32]
Conditions: none
For the WHOLE specified f(x)=1/2 sum d_i x_i²+sum b_i x_i,differentiate each coordinate to d_i x_i+b_i,not2d_i x_i.Compute ALL gradient entries first,then the objective in original order,squaring before multiplying d_i.Qualify positive diagonals,dimensions and coordinate order.
Step identifiers and dependencies
Rule: GD_WHOLE_positive_diagonal_quadratic_ordered_gradient_and_objective · Uses: G001, S038
S040 · implies
Before
source roles = [[-2, 3], [-7, 3], 1/4]
After
derived = [[-1/4, 9/4], 8, -43/32, Yes]
Conditions: none
This family requires only a positive step and compares the ACTUAL objectives.The flag can be False.A positive_step description does not imply descent,and no stronger safe-step guard is added.
Step identifiers and dependencies
Rule: GD_one_positive_step_ACTUAL_objective_comparison_not_safe_assumption · Uses: G001, S039