Changes between Initial Version and Version 6 of Ticket #6480


Ignore:
Timestamp:
05/15/13 18:11:49 (8 years ago)
Author:
kcrisman
Comment:

I feel like if that one is closed, we should have the list here, so I'm updating the description.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6480

    • Property Cc kcrisman mjo eviatarbach added
    • Property Report Upstream changed from to N/A
  • Ticket #6480 – Description

    initial v6  
    1919D[0](f)(x)
    2020}}}
     21
     22
     23
     24----
     25
     26
     27From #11842, the list of what does/doesn't work:
     28{{{
     29from sage.all import *
     30
     31
     32# 1. Fails.
     33x = var('x')
     34f = function('f', x)
     35g = function('g', x)
     36p = f
     37print p.substitute_function(f, g) # Outputs "f(x)"
     38
     39
     40
     41# 2. Fails.
     42x = var('x')
     43f = function('f')
     44g = function('g')
     45p = f(x)
     46print p.substitute_function(f(x), g(x)) # Outputs "f(x)"
     47
     48
     49
     50# 3. Works.
     51x = var('x')
     52f = function('f')
     53g = function('g')
     54p = f(x)
     55print p.substitute_function(f, g) # Outputs "g(x)"
     56
     57
     58
     59# 4. Fails.
     60x = var('x')
     61f = function('f')
     62g = function('g')
     63p = f(1)
     64print p.substitute_function(f(1), g(1)) # Outputs "f(1)"
     65
     66
     67
     68# 5. Works.
     69x = var('x')
     70f = function('f')
     71g = function('g')
     72p = f(1)
     73print p.substitute_function(f, g) # Outputs "g(1)"
     74
     75
     76
     77# 6. Fails.
     78x = var('x')
     79f = function('f', x)
     80g = function('g', x)
     81p = f.diff()
     82print p.substitute_function(f, g) # Outputs "D[0](f)(x)"
     83
     84
     85
     86# 7. Fails.
     87x = var('x')
     88f = function('f', x)
     89g = function('g', x)
     90p = f.diff()
     91print p.substitute_function(f(x), g(x)) # Outputs "D[0](f)(x)"
     92
     93
     94
     95# 8. Works.
     96x = var('x')
     97f = function('f')
     98g = function('g')
     99p = f(x).diff()
     100print p.substitute_function(f, g) # Outputs "D[0](g)(x)"
     101
     102
     103
     104# 9. Fails.
     105x = var('x')
     106f = function('f')
     107g = function('g')
     108p = f(x).diff()(1)
     109print p.substitute_function(f(x).diff(), g(x).diff()) # Outputs "D[0](f)(1)"
     110
     111
     112
     113# 10. Works..
     114x = var('x')
     115f = function('f')
     116g = function('g')
     117p = f(x).diff()(1)
     118print p.substitute_function(f, g) # Prints D[0](g)(1).
     119}}}