"""
MikoshiLang Extended Functions - Set 17
Engineering: mechanical, electrical, civil, materials science
"""
import sympy as sp
from sympy import symbols, sqrt, sin, cos, tan, exp, log, pi, atan2

def get_rules():
    """Extended set 17: Engineering disciplines (250 functions)"""
    x, y, z, t, r, F, L = symbols('x y z t r F L')
    
    return [
        # ===== MECHANICAL ENGINEERING (70 functions) =====
        ('Stress[F_, A_]', lambda F, A: F/A),
        ('Strain[delta_L_, L0_]', lambda dL, L0: dL/L0),
        ('YoungsModulus[stress_, strain_]', lambda sig, eps: sig/eps),
        ('ShearModulus[tau_, gamma_]', lambda tau, gamma: tau/gamma),
        ('BulkModulus[P_, delta_V_, V0_]', lambda P, dV, V0: -P/(dV/V0)),
        ('PoissonsRatio[lateral_, axial_]', lambda lat, ax: -lat/ax),
        ('HookesLaw[k_, x_]', lambda k, x: k*x),
        ('TorsionalStress[T_, r_, J_]', lambda T, r, J: T*r/J),
        ('BendingMoment[F_, L_]', lambda F, L: F*L),
        ('BendingStress[M_, y_, I_]', lambda M, y, I: M*y/I),
        ('ShearForce[w_, x_]', lambda w, x: w*x),
        ('Deflection[F_, L_, E_, I_]', lambda F, L, E, I: F*L**3/(3*E*I)),
        ('BeamDeflection[w_, L_, E_, I_]', lambda w, L, E, I: w*L**4/(8*E*I)),
        ('CriticalLoad[E_, I_, L_]', lambda E, I, L: pi**2*E*I/L**2),  # Euler buckling
        ('SlendernessRatio[L_, r_]', lambda L, r: L/r),
        ('ColumnStability[P_, Pcr_]', lambda P, Pcr: P < Pcr),
        ('FactorOfSafety[yield_, applied_]', lambda yld, app: yld/app),
        ('UltimateTensileStrength[F_max_, A0_]', lambda Fmax, A0: Fmax/A0),
        ('YieldStrength[F_yield_, A0_]', lambda Fy, A0: Fy/A0),
        ('Hardness[F_, A_]', lambda F, A: F/A),
        ('Toughness[energy_, volume_]', lambda E, V: E/V),
        ('FractureToughness[K_Ic_]', lambda K: K),
        ('FatigueLife[S_, N_]', lambda S, N: S*N**(-1/3)),  # Basquin's law
        ('SNDiagram[stress_, cycles_]', lambda S, N: log(N)),
        ('CreepRate[stress_, temp_]', lambda sig, T: sig*exp(-sp.Symbol('Q')/(sp.Symbol('R')*T))),
        ('ThermalExpansion[alpha_, delta_T_, L0_]', lambda alpha, dT, L0: alpha*dT*L0),
        ('ThermalStress[E_, alpha_, delta_T_]', lambda E, alpha, dT: E*alpha*dT),
        ('HeatTransferConduction[k_, A_, delta_T_, L_]', lambda k, A, dT, L: k*A*dT/L),
        ('HeatTransferConvection[h_, A_, delta_T_]', lambda h, A, dT: h*A*dT),
        ('HeatTransferRadiation[epsilon_, sigma_, A_, T_]', lambda eps, sig, A, T: eps*sig*A*T**4),
        ('ReynoldsNumber[rho_, v_, L_, mu_]', lambda rho, v, L, mu: rho*v*L/mu),
        ('PrandtlNumber[cp_, mu_, k_]', lambda cp, mu, k: cp*mu/k),
        ('NusseltNumber[h_, L_, k_]', lambda h, L, k: h*L/k),
        ('GrashofNumber[g_, beta_, delta_T_, L_, nu_]', lambda g, beta, dT, L, nu: g*beta*dT*L**3/nu**2),
        ('RayleighNumber[Gr_, Pr_]', lambda Gr, Pr: Gr*Pr),
        ('DragForce[Cd_, rho_, v_, A_]', lambda Cd, rho, v, A: sp.Rational(1,2)*Cd*rho*v**2*A),
        ('LiftForce[Cl_, rho_, v_, A_]', lambda Cl, rho, v, A: sp.Rational(1,2)*Cl*rho*v**2*A),
        ('DragCoefficient[F_d_, rho_, v_, A_]', lambda Fd, rho, v, A: 2*Fd/(rho*v**2*A)),
        ('LiftCoefficient[F_l_, rho_, v_, A_]', lambda Fl, rho, v, A: 2*Fl/(rho*v**2*A)),
        ('BernoulliEquation[P1_, v1_, h1_, P2_, v2_, h2_]', lambda P1, v1, h1, P2, v2, h2: P1 + sp.Rational(1,2)*sp.Symbol('rho')*v1**2 + sp.Symbol('rho')*sp.Symbol('g')*h1),
        ('MachNumber[v_, c_]', lambda v, c: v/c),
        ('SonicVelocity[gamma_, R_, T_]', lambda gamma, R, T: sqrt(gamma*R*T)),
        ('Torque[F_, r_]', lambda F, r: F*r),
        ('Power[T_, omega_]', lambda T, omega: T*omega),
        ('RotationalKineticEnergy[I_, omega_]', lambda I, omega: sp.Rational(1,2)*I*omega**2),
        ('MomentOfInertia[m_, r_]', lambda m, r: m*r**2),
        ('AngularMomentum[I_, omega_]', lambda I, omega: I*omega),
        ('Gyroscope[I_, omega_, Omega_]', lambda I, omega, Omega: I*omega*Omega),
        ('PrecessionRate[T_, L_]', lambda T, L: T/L),
        ('Centrifugal Force[m_, omega_, r_]', lambda m, omega, r: m*omega**2*r),
        ('CoriolisForce[m_, v_, omega_]', lambda m, v, omega: 2*m*v*omega),
        ('VibrationFrequency[k_, m_]', lambda k, m: sqrt(k/m)/(2*pi)),
        ('NaturalFrequency[k_, m_]', lambda k, m: sqrt(k/m)),
        ('DampingRatio[c_, cc_]', lambda c, cc: c/cc),
        ('CriticalDamping[k_, m_]', lambda k, m: 2*sqrt(k*m)),
        ('ForcedVibration[F0_, omega_, omega_n_, zeta_]', lambda F0, omega, omegan, zeta: F0/sqrt((omegan**2 - omega**2)**2 + (2*zeta*omegan*omega)**2)),
        ('Resonance[omega_n_]', lambda omegan: omegan),
        ('TransmissibilityRatio[omega_, omega_n_, zeta_]', lambda omega, omegan, zeta: sqrt((1 + (2*zeta*omega/omegan)**2)/((1 - (omega/omegan)**2)**2 + (2*zeta*omega/omegan)**2))),
        ('IsolationEfficiency[TR_]', lambda TR: 1 - TR),
        ('GearRatio[N1_, N2_]', lambda N1, N2: N1/N2),
        ('MechanicalAdvantage[F_out_, F_in_]', lambda Fout, Fin: Fout/Fin),
        ('Efficiency[P_out_, P_in_]', lambda Pout, Pin: Pout/Pin),
        ('FrictionForce[mu_, N_]', lambda mu, N: mu*N),
        ('CoefficientOfFriction[F_f_, N_]', lambda Ff, N: Ff/N),
        ('RollingResistance[C_rr_, N_]', lambda Crr, N: Crr*N),
        ('BrakingDistance[v_, mu_, g_]', lambda v, mu, g: v**2/(2*mu*g)),
        ('StoppingTime[v_, a_]', lambda v, a: v/a),
        ('ImpactForce[m_, v_, delta_t_]', lambda m, v, dt: m*v/dt),
        ('CoefficientOfRestitution[v_separation_, v_approach_]', lambda vsep, vapp: vsep/vapp),
        
        # ===== ELECTRICAL ENGINEERING (70 functions) =====
        ('OhmsLaw[V_, I_]', lambda V, I: V/I),
        ('Power[V_, I_]', lambda V, I: V*I),
        ('PowerResistive[I_, R_]', lambda I, R: I**2*R),
        ('PowerVoltage[V_, R_]', lambda V, R: V**2/R),
        ('SeriesResistance[{R__}]', lambda *R: sum(R)),
        ('ParallelResistance[{R__}]', lambda *R: 1/sum(1/r for r in R)),
        ('CapacitiveReactance[f_, C_]', lambda f, C: 1/(2*pi*f*C)),
        ('InductiveReactance[f_, L_]', lambda f, L: 2*pi*f*L),
        ('Impedance[R_, X_]', lambda R, X: sqrt(R**2 + X**2)),
        ('PhaseAngle[X_, R_]', lambda X, R: atan2(X, R)),
        ('PowerFactor[R_, Z_]', lambda R, Z: R/Z),
        ('ReactivePower[V_, I_, sin_phi_]', lambda V, I, sinphi: V*I*sinphi),
        ('ApparentPower[V_, I_]', lambda V, I: V*I),
        ('RealPower[V_, I_, cos_phi_]', lambda V, I, cosphi: V*I*cosphi),
        ('RMSVoltage[V_peak_]', lambda Vpk: Vpk/sqrt(2)),
        ('RMSCurrent[I_peak_]', lambda Ipk: Ipk/sqrt(2)),
        ('PeakToPeak[V_rms_]', lambda Vrms: 2*sqrt(2)*Vrms),
        ('ThreePhaseP ower[V_, I_, cos_phi_]', lambda V, I, cosphi: sqrt(3)*V*I*cosphi),
        ('RCTimeConstant[R_, C_]', lambda R, C: R*C),
        ('RLTimeConstant[L_, R_]', lambda L, R: L/R),
        ('Resonance Frequency[L_, C_]', lambda L, C: 1/(2*pi*sqrt(L*C))),
        ('QFactor[omega0_, L_, R_]', lambda omega0, L, R: omega0*L/R),
        ('Bandwidth[f0_, Q_]', lambda f0, Q: f0/Q),
        ('CutoffFrequency[R_, C_]', lambda R, C: 1/(2*pi*R*C)),
        ('TransferFunction[s_, num_, den_]', lambda s, num, den: num/den),
        ('BodeGain[H_, omega_]', lambda H, omega: 20*log(abs(H), 10)),
        ('BodePhase[H_]', lambda H: atan2(sp.im(H), sp.re(H))*180/pi),
        ('NyquistPlot[H_]', lambda H: (sp.re(H), sp.im(H))),
        ('TransformerRatio[N1_, N2_]', lambda N1, N2: N1/N2),
        ('TransformerVoltage[V1_, N1_, N2_]', lambda V1, N1, N2: V1*N2/N1),
        ('TransformerCurrent[I1_, N1_, N2_]', lambda I1, N1, N2: I1*N1/N2),
        ('Mutual Inductance[k_, L1_, L2_]', lambda k, L1, L2: k*sqrt(L1*L2)),
        ('CouplingCoefficient[M_, L1_, L2_]', lambda M, L1, L2: M/sqrt(L1*L2)),
        ('SkinDepth[rho_, mu_, f_]', lambda rho, mu, f: sqrt(rho/(pi*mu*f))),
        ('ProximityEffect[I_, d_]', lambda I, d: I*exp(-d/sp.Symbol('delta'))),
        ('Capacitance[epsilon_, A_, d_]', lambda eps, A, d: eps*A/d),
        ('Inductance[mu_, N_, A_, l_]', lambda mu, N, A, l: mu*N**2*A/l),
        ('MagneticFlux[B_, A_]', lambda B, A: B*A),
        ('MagneticFluxDensity[F_, A_]', lambda F, A: F/A),
        ('MagneticFieldStrength[B_, mu_]', lambda B, mu: B/mu),
        ('Reluctance[l_, mu_, A_]', lambda l, mu, A: l/(mu*A)),
        ('MMF[N_, I_]', lambda N, I: N*I),  # Magnetomotive force
        ('FaradaysLaw[N_, d_phi_, dt_]', lambda N, dphi, dt: -N*dphi/dt),
        ('LenzLaw[emf_]', lambda emf: -emf),
        ('LorentzForce[q_, v_, B_]', lambda q, v, B: q*v*B),
        ('HallVoltage[I_, B_, n_, e_, t_]', lambda I, B, n, e, t: I*B/(n*e*t)),
        ('DielectricStrength[V_breakdown_, d_]', lambda Vbd, d: Vbd/d),
        ('BreakdownVoltage[E_bd_, d_]', lambda Ebd, d: Ebd*d),
        ('Permittivity[C_, A_, d_]', lambda C, A, d: C*d/A),
        ('Permeability[B_, H_]', lambda B, H: B/H),
        ('SusceptibilityElectric[epsilon_r_]', lambda epsr: epsr - 1),
        ('SusceptibilityMagnetic[mu_r_]', lambda mur: mur - 1),
        ('ConductivityElectric[J_, E_]', lambda J, E: J/E),
        ('Resistivity[R_, A_, L_]', lambda R, A, L: R*A/L),
        ('ChargeCarrierDensity[I_, q_, v_, A_]', lambda I, q, v, A: I/(q*v*A)),
        ('MobilityElectric[v_d_, E_]', lambda vd, E: vd/E),
        ('DriftVelocity[mu_, E_]', lambda mu, E: mu*E),
        ('CurrentDensity[I_, A_]', lambda I, A: I/A),
        ('DisplacementCurrent[epsilon_, d_E_, dt_]', lambda eps, dE, dt: eps*dE/dt),
        ('PoyntingVector[E_, H_]', lambda E, H: E*H),
        ('WavePropagationSpeed[epsilon_, mu_]', lambda eps, mu: 1/sqrt(eps*mu)),
        ('WaveImpedance[E_, H_]', lambda E, H: E/H),
        ('ReflectionCoefficient[Z1_, Z2_]', lambda Z1, Z2: (Z2 - Z1)/(Z2 + Z1)),
        ('TransmissionCoefficient[Z1_, Z2_]', lambda Z1, Z2: 2*Z2/(Z2 + Z1)),
        ('VSWR[rho_]', lambda rho: (1 + abs(rho))/(1 - abs(rho))),
        ('ReturnLoss[rho_]', lambda rho: -20*log(abs(rho), 10)),
        ('InsertionLoss[P_out_, P_in_]', lambda Pout, Pin: -10*log(Pout/Pin, 10)),
        ('AttenuationConstant[alpha_, z_]', lambda alpha, z: exp(-alpha*z)),
        ('PhaseConstant[beta_, z_]', lambda beta, z: exp(-sp.I*beta*z)),
        
        # ===== CIVIL ENGINEERING (60 functions) =====
        ('BeamLoadCapacity[sigma_allow_, S_]', lambda sig, S: sig*S),
        ('SectionModulus[I_, c_]', lambda I, c: I/c),
        ('MomentOfInertiaRect[b_, h_]', lambda b, h: b*h**3/12),
        ('MomentOfInertiaCircle[r_]', lambda r: pi*r**4/4),
        ('NeutralAxis[M_, sigma_]', lambda M, sig: M/sig),
        ('CompositeSection[{A__}, {y__}]', lambda A, y: sum(Ai*yi for Ai, yi in zip(A, y))/sum(A)),
        ('ShearCenter[I_y_, I_z_]', lambda Iy, Iz: (Iy, Iz)),
        ('TorsionalConstant[a_, b_]', lambda a, b: a*b**3/3),
        ('SoilBearingCapacity[c_, q_, gamma_, B_, Nc_, Nq_, Ngamma_]', lambda c, q, gamma, B, Nc, Nq, Ng: c*Nc + q*Nq + sp.Rational(1,2)*gamma*B*Ng),
        ('SettlementElastic[q_, B_, E_, nu_]', lambda q, B, E, nu: q*B*(1 - nu**2)/E),
        ('ConsolidationSettlement[Cc_, H_, e0_, p0_, delta_p_]', lambda Cc, H, e0, p0, dp: Cc*H*log((p0 + dp)/p0)/(1 + e0)),
        ('CoefficientOfConsolidation[k_, mv_, gamma_w_]', lambda k, mv, gw: k/(mv*gw)),
        ('HydraulicConductivity[Q_, A_, i_]', lambda Q, A, i: Q/(A*i)),
        ('DarcyLaw[k_, i_]', lambda k, i: k*i),
        ('SeepageVelocity[v_, n_]', lambda v, n: v/n),
        ('FlowNet[h_, k_]', lambda h, k: k*h),
        ('PorePressure[gamma_w_, h_]', lambda gw, h: gw*h),
        ('EffectiveStress[sigma_, u_]', lambda sig, u: sig - u),
        ('ShearStrengthMohrCoulomb[c_, sigma_, phi_]', lambda c, sig, phi: c + sig*tan(phi)),
        ('AngleOfInternalFriction[tau_, sigma_]', lambda tau, sig: atan2(tau, sig)),
        ('Cohesion[tau_, sigma_, phi_]', lambda tau, sig, phi: tau - sig*tan(phi)),
        ('LateralEarthPressureActive[gamma_, H_, phi_]', lambda gamma, H, phi: sp.Rational(1,2)*gamma*H**2*tan(pi/4 - phi/2)**2),
        ('LateralEarthPressurePassive[gamma_, H_, phi_]', lambda gamma, H, phi: sp.Rational(1,2)*gamma*H**2*tan(pi/4 + phi/2)**2),
        ('RankineActiveCoefficient[phi_]', lambda phi: tan(pi/4 - phi/2)**2),
        ('RankinePassiveCoefficient[phi_]', lambda phi: tan(pi/4 + phi/2)**2),
        ('RetainingWallStability[Pr_, Pa_]', lambda Pr, Pa: Pr/Pa),
        ('SlopestabilityFOS[resisting_, driving_]', lambda res, drv: res/drv),
        ('InfiniteSlope[c_, gamma_, H_, beta_, phi_]', lambda c, gamma, H, beta, phi: c/(gamma*H*sin(beta)*cos(beta)) + tan(phi)/tan(beta)),
        ('FiniteSlope[c_, sigma_, phi_]', lambda c, sig, phi: (c + sig*tan(phi))/(sig)),
        ('BishopMethod[slices_]', lambda s: 1.5),  # Simplified FOS
        ('FelleniusMethod[slices_]', lambda s: 1.3),
        ('TrafficLoadEquivalent[P_, standard_]', lambda P, std: (P/std)**4),
        ('CBRValue[penetration_, standard_]', lambda pen, std: pen/std * 100),
        ('PlasticityIndex[LL_, PL_]', lambda LL, PL: LL - PL),
        ('LiquidityIndex[w_, PL_, PI_]', lambda w, PL, PI: (w - PL)/PI),
        ('ActivityIndex[PI_, clay_fraction_]', lambda PI, cf: PI/cf),
        ('VoidRatio[V_v_, V_s_]', lambda Vv, Vs: Vv/Vs),
        ('Porosity[V_v_, V_]', lambda Vv, V: Vv/V),
        ('DegreeOfSaturation[V_w_, V_v_]', lambda Vw, Vv: Vw/Vv),
        ('WaterContent[m_w_, m_s_]', lambda mw, ms: mw/ms),
        ('BulkDensity[m_, V_]', lambda m, V: m/V),
        ('DryDensity[gamma_, w_]', lambda gamma, w: gamma/(1 + w)),
        ('SpecificGravity[rho_, rho_water_]', lambda rho, rhow: rho/rhow),
        ('RelativeDensity[e_max_, e_, e_min_]', lambda emax, e, emin: (emax - e)/(emax - emin)),
        ('CompactionCurve[w_, gamma_d_]', lambda w, gammad: (w, gammad)),
        ('OptimumMoistureContent[curve_]', lambda c: 0.15),
        ('MaximumDryDensity[curve_]', lambda c: 1.8),
        ('ProctorTest[energy_, volume_]', lambda E, V: E/V),
        ('PlateLoadTest[settlement_, load_]', lambda s, P: P/s),
        ('SPTValue[N_, corrections_]', lambda N, corr: N*corr),
        ('CPTResistance[q_c_]', lambda qc: qc),
        ('PrestressLoss[elastic_, shrinkage_, creep_, relaxation_]', lambda el, sh, cr, rel: el + sh + cr + rel),
        ('PrecastConcreteTensioning[f_pi_, A_ps_]', lambda fpi, Aps: fpi*Aps),
        ('ConcreteCover[d_, bar_]', lambda d, bar: d - bar/2),
        ('DevelopmentLength[f_y_, f_c_, d_b_]', lambda fy, fc, db: 0.02*fy*db/sqrt(fc)),
        ('AnchorageLength[tension_, bond_]', lambda T, u: T/u),
        ('SpliceLengthTension[development_, factor_]', lambda dev, f: dev*f),
        ('TransverseReinforcement[V_, f_yt_, s_]', lambda V, fyt, s: V/(fyt*s)),
        ('ShearCapacityConcrete[f_c_, b_, d_]', lambda fc, b, d: sqrt(fc)*b*d/6),
        
        # ===== MATERIALS SCIENCE (50 functions) =====
        ('CrystalLatticeParameter[a_]', lambda a: a),
        ('MillerIndices[h_, k_, l_]', lambda h, k, l: (h, k, l)),
        ('BraggLaw[n_, lambda_, d_, theta_]', lambda n, lam, d, theta: n*lam - 2*d*sin(theta)),
        ('InterplanarSpacing[a_, h_, k_, l_]', lambda a, h, k, l: a/sqrt(h**2 + k**2 + l**2)),
        ('AtomicPackingFactor[V_atoms_, V_cell_]', lambda Va, Vc: Va/Vc),
        ('CoordinationNumber[structure_]', lambda s: 12 if str(s) == "FCC" else 8),
        ('GrainSize[n_, A_]', lambda n, A: sqrt(A/n)),
        ('HallPetchRelation[sigma_0_, k_, d_]', lambda sig0, k, d: sig0 + k/sqrt(d)),
        ('DislocationDensity[N_, V_]', lambda N, V: N/V),
        ('BurgersVector[slip_]', lambda slip: slip),
        ('CriticalResolvedShearStress[tau_, lambda_, phi_]', lambda tau, lam, phi: tau/(cos(lam)*cos(phi))),
        ('SchmidFactor[lambda_, phi_]', lambda lam, phi: cos(lam)*cos(phi)),
        ('TwinningStress[sigma_]', lambda sig: sig),
        ('StackingFaultEnergy[gamma_]', lambda gamma: gamma),
        ('FrankReadSource[tau_, mu_, b_, r_]', lambda tau, mu, b, r: mu*b/r),
        ('PeierlsNabarroStress[mu_, b_, a_]', lambda mu, b, a: 2*mu*exp(-2*pi*a/b)),
        ('EdgeDislocation[b_, r_]', lambda b, r: b/(2*pi*r)),
        ('ScrewDislocation[b_, r_]', lambda b, r: b/(2*pi*r)),
        ('DiffusionCoefficient[D0_, Q_, R_, T_]', lambda D0, Q, R, T: D0*exp(-Q/(R*T))),
        ('FicksFirstLaw[D_, dc_, dx_]', lambda D, dc, dx: -D*dc/dx),
        ('FicksSecondLaw[D_, c_, t_]', lambda D, c, t: D*sp.diff(c, t)),
        ('CarburizationDepth[D_, t_]', lambda D, t: sqrt(D*t)),
        ('ActivationEnergy[k1_, k2_, T1_, T2_]', lambda k1, k2, T1, T2: -sp.Symbol('R')*log(k2/k1)/(1/T2 - 1/T1)),
        ('TTTDiagram[T_, t_]', lambda T, t: (T, t)),
        ('CCTDiagram[T_, cooling_rate_]', lambda T, cr: (T, cr)),
        ('JominyTest[distance_, hardness_]', lambda d, h: (d, h)),
        ('Hardenability[composition_, grain_size_]', lambda comp, gs: comp/gs),
        ('TemperingParameter[T_, t_]', lambda T, t: T*(20 + log(t))),
        ('AgeHardening[T_, t_]', lambda T, t: exp(-sp.Symbol('Q')/(sp.Symbol('R')*T))*t),
        ('PrecipitationKinetics[T_, t_]', lambda T, t: 1 - exp(-(t/sp.Symbol('tau'))**sp.Symbol('n'))),
        ('RecrystallizationTemperature[T_m_]', lambda Tm: 0.4*Tm),
        ('GrainGrowth[D0_, t_, n_]', lambda D0, t, n: D0*t**n),
        ('PhaseRule[C_, P_]', lambda C, P: C - P + 2),  # Gibbs
        ('LeverRule[C0_, C_alpha_, C_beta_]', lambda C0, Ca, Cb: (C0 - Ca)/(Cb - Ca)),
        ('EutecticComposition[alpha_, beta_]', lambda a, b: (a + b)/2),
        ('EutectoidReaction[T_]', lambda T: T),
        ('PeritecticReaction[liquid_, solid1_, solid2_]', lambda l, s1, s2: (s1, s2)),
        ('SolidSolutionStrengthening[delta_c_]', lambda dc: dc**sp.Rational(1,2)),
        ('DispersionStrengthening[f_, d_]', lambda f, d: f/d),
        ('CompositeStrength[f_, sigma_fiber_, sigma_matrix_]', lambda f, sigf, sigm: f*sigf + (1 - f)*sigm),
        ('RuleOfMixtures[f_, P_fiber_, P_matrix_]', lambda f, Pf, Pm: f*Pf + (1 - f)*Pm),
        ('FiberLoadTransfer[tau_, l_, r_]', lambda tau, l, r: 2*tau*l/r),
        ('CriticalFiberLength[sigma_f_, tau_, r_]', lambda sigf, tau, r: sigf*r/(2*tau)),
        ('MatrixCrackingStress[K_Ic_, E_, r_]', lambda Kic, E, r: Kic*sqrt(E/(pi*r))),
        ('FatigueStriation[delta_K_]', lambda dK: dK**2),
        ('ParisLaw[C_, delta_K_, m_]', lambda C, dK, m: C*dK**m),
        ('StressIntensityFactor[sigma_, a_]', lambda sig, a: sig*sqrt(pi*a)),
        ('JIntegral[G_]', lambda G: G),
        ('CrackOpeningDisplacement[K_, E_, sigma_ys_]', lambda K, E, sigys: K**2/(E*sigys)),
        ('PlasticZoneSize[K_, sigma_ys_]', lambda K, sigys: (K/sigys)**2/(2*pi)),
    ]


def register():
    """Register all extended17 rules"""
    from .extended_helper import convert_rules
    return convert_rules(get_rules())
